diff options
Diffstat (limited to 'lib/gitlab/ci/config/node/script.rb')
-rw-r--r-- | lib/gitlab/ci/config/node/script.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/gitlab/ci/config/node/script.rb b/lib/gitlab/ci/config/node/script.rb index 5072bf0db7d..39328f0fade 100644 --- a/lib/gitlab/ci/config/node/script.rb +++ b/lib/gitlab/ci/config/node/script.rb @@ -5,22 +5,11 @@ module Gitlab ## # Entry that represents a script. # - # Each element in the value array is a command that will be executed - # by GitLab Runner. Currently we concatenate these commands with - # new line character as a separator, what is compatible with - # implementation in Runner. - # class Script < Entry - include ValidationHelpers - - def value - @value.join("\n") - end + include Validatable - def validate! - unless validate_array_of_strings(@value) - @errors << 'before_script should be an array of strings' - end + validations do + validates :config, array_of_strings: true end end end |