mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 05:36:07 +10:00
28 lines
562 B
Ruby
28 lines
562 B
Ruby
module Gitlab
|
|
module Ci
|
|
class Config
|
|
module Node
|
|
class BeforeScript < Entry
|
|
include ValidationHelpers
|
|
|
|
def description
|
|
'Script that is executed before the one defined in a job.'
|
|
end
|
|
|
|
def script
|
|
raise unless valid?
|
|
|
|
@value.join("\n")
|
|
end
|
|
|
|
def validate!
|
|
unless validate_array_of_strings(@value)
|
|
@errors << 'before_script should be an array of strings'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|