diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-17 09:06:55 -0400 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-17 09:06:55 -0400 |
commit | 5a7e4dfd3362d08c856fdfcf4b82584c2cac169f (patch) | |
tree | 4e87f3beab05ea24fb2ad7368ceb3c31d3a0b666 /lib | |
parent | 4cc9a02ee033564b62b45977571319d129df465b (diff) | |
parent | a0afeefd76ebfacae59343f48e127828b27ba77a (diff) | |
download | gitlab-ce-5a7e4dfd3362d08c856fdfcf4b82584c2cac169f.tar.gz |
Merge branch 'after-script' into make-before-after-overridable
* after-script:
Add CHANGELOG and documentation
Rename finally_script to after_script
Conflicts:
lib/ci/gitlab_ci_yaml_processor.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 2e5b84a57d6..d7958bbfe44 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -4,12 +4,12 @@ module Ci DEFAULT_STAGES = %w(build test deploy) DEFAULT_STAGE = 'test' - ALLOWED_YAML_KEYS = [:before_script, :finally_script, :image, :services, :types, :stages, :variables, :cache] + ALLOWED_YAML_KEYS = [:before_script, :after_script, :image, :services, :types, :stages, :variables, :cache] ALLOWED_JOB_KEYS = [:tags, :script, :only, :except, :type, :image, :services, :allow_failure, :type, :stage, :when, :artifacts, :cache, - :dependencies, :before_script, :finally_script] + :dependencies, :before_script, :after_script] - attr_reader :before_script, :finally_script, :image, :services, :variables, :path, :cache + attr_reader :before_script, :after_script, :image, :services, :variables, :path, :cache def initialize(config, path = nil) @config = YAML.safe_load(config, [Symbol], [], true) @@ -44,7 +44,7 @@ module Ci def initial_parsing @before_script = @config[:before_script] || [] - @finally_script = @config[:finally_script] + @after_script = @config[:after_script] @image = @config[:image] @services = @config[:services] @stages = @config[:stages] || @config[:types] @@ -86,7 +86,7 @@ module Ci artifacts: job[:artifacts], cache: job[:cache] || @cache, dependencies: job[:dependencies], - finally_script: job[:finally_script] || @finally_script, + after_script: job[:after_script] || @after_script, }.compact } end @@ -96,8 +96,8 @@ module Ci raise ValidationError, "before_script should be an array of strings" end - unless @finally_script.nil? || validate_array_of_strings(@finally_script) - raise ValidationError, "finally_script should be an array of strings" + unless @after_script.nil? || validate_array_of_strings(@after_script) + raise ValidationError, "after_script should be an array of strings" end unless @image.nil? || @image.is_a?(String) @@ -173,8 +173,8 @@ module Ci raise ValidationError, "#{name} job: before_script should be an array of strings" end - if job[:finally_script] && !validate_array_of_strings(job[:finally_script]) - raise ValidationError, "#{name} job: finally_script should be an array of strings" + if job[:after_script] && !validate_array_of_strings(job[:after_script]) + raise ValidationError, "#{name} job: after_script should be an array of strings" end if job[:image] && !validate_string(job[:image]) |