2016-06-06 03:05:00 -04:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
class Config
|
2016-06-06 03:24:16 -04:00
|
|
|
module Node
|
2016-06-09 07:01:19 -04:00
|
|
|
##
|
|
|
|
# Entry that represents a script.
|
|
|
|
#
|
|
|
|
# Each element in the value array is a command that will be executed
|
|
|
|
# by GitLab Runner. Currently we concatenate this commands with
|
|
|
|
# new line character as a separator what is compatbile with
|
|
|
|
# implementation in Runner.
|
|
|
|
#
|
2016-06-08 07:22:39 -04:00
|
|
|
class Script < Entry
|
2016-06-07 06:58:32 -04:00
|
|
|
include ValidationHelpers
|
|
|
|
|
2016-06-08 06:32:56 -04:00
|
|
|
def value
|
2016-06-07 08:23:47 -04:00
|
|
|
@value.join("\n")
|
|
|
|
end
|
|
|
|
|
2016-06-06 04:43:11 -04:00
|
|
|
def validate!
|
2016-06-06 05:20:47 -04:00
|
|
|
unless validate_array_of_strings(@value)
|
|
|
|
@errors << 'before_script should be an array of strings'
|
|
|
|
end
|
2016-06-06 03:05:00 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|