diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-01-14 14:39:53 -0500 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-06-12 12:58:35 +0200 |
commit | 8c6e2bada222745c9994da42f21bad2ab43b9351 (patch) | |
tree | afd67edfeda2c7d81b51379f85b0e12dfb22e0cc /lib/gitlab/ci/config/entry/image.rb | |
parent | 5478ff6dc2ad59a7c7d91f61339e8acee9bbb434 (diff) | |
download | gitlab-ce-8c6e2bada222745c9994da42f21bad2ab43b9351.tar.gz |
Add support for docker image configuration in .gitlab-ci.yml
Diffstat (limited to 'lib/gitlab/ci/config/entry/image.rb')
-rw-r--r-- | lib/gitlab/ci/config/entry/image.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/entry/image.rb b/lib/gitlab/ci/config/entry/image.rb index b5050257688..10f35a2dbc1 100644 --- a/lib/gitlab/ci/config/entry/image.rb +++ b/lib/gitlab/ci/config/entry/image.rb @@ -7,9 +7,16 @@ module Gitlab # class Image < Node include Validatable + include DockerImage + + ALLOWED_KEYS = %i[name entrypoint].freeze validations do - validates :config, type: String + validates :config, hash_or_string: true + validates :config, allowed_keys: ALLOWED_KEYS + + validates :name, type: String, presence: true + validates :entrypoint, type: String, allow_nil: true end end end |