diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-06-05 16:15:09 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-06-12 12:58:35 +0200 |
commit | c70e9f2ed107ac3d0189a803eae6e7e7917f6224 (patch) | |
tree | 5006c53ceee82297827a0c18285f728d8e1cdc6f /lib/gitlab/ci/build | |
parent | 8c6e2bada222745c9994da42f21bad2ab43b9351 (diff) | |
download | gitlab-ce-c70e9f2ed107ac3d0189a803eae6e7e7917f6224.tar.gz |
Send new configuration options with job's payload
Diffstat (limited to 'lib/gitlab/ci/build')
-rw-r--r-- | lib/gitlab/ci/build/image.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/gitlab/ci/build/image.rb b/lib/gitlab/ci/build/image.rb index c62aeb60fa9..b88b2e36d53 100644 --- a/lib/gitlab/ci/build/image.rb +++ b/lib/gitlab/ci/build/image.rb @@ -2,7 +2,7 @@ module Gitlab module Ci module Build class Image - attr_reader :name + attr_reader :alias, :command, :entrypoint, :name class << self def from_image(job) @@ -21,7 +21,14 @@ module Gitlab end def initialize(image) - @name = image + if image.is_a?(String) + @name = image + elsif image.is_a?(Hash) + @alias = image[:alias] + @command = image[:command] + @entrypoint = image[:entrypoint] + @name = image[:name] + end end def valid? |