Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-13 16:04:12 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-13 16:04:12 +0300
commit036e297ca3c39f90aebc76d5acb2e01f32364d0d (patch)
treee1d6c96804c28e7fe6693759d8124ae080557865 /lib/ci
parent6920390aad683dcc73109be5a23b647c918f9309 (diff)
Expose CI job commands and use in legacy processor
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/gitlab_ci_yaml_processor.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb
index ed8dd0f9e47..61075d3b923 100644
--- a/lib/ci/gitlab_ci_yaml_processor.rb
+++ b/lib/ci/gitlab_ci_yaml_processor.rb
@@ -80,12 +80,7 @@ module Ci
{
stage_idx: @stages.index(job[:stage]),
stage: job[:stage],
- ##
- # Refactoring note:
- # - before script behaves differently than after script
- # - after script returns an array of commands
- # - before script should be a concatenated command
- commands: [job[:before_script] || @before_script, job[:script]].flatten.compact.join("\n"),
+ commands: job[:commands],
tag_list: job[:tags] || [],
name: name,
only: job[:only],
@@ -124,8 +119,12 @@ module Ci
end
def validate_job_keys!(name, job)
+ ##
+ # TODO, remove refactoring keys
+ #
+ refactoring_keys = [:commands]
job.keys.each do |key|
- unless ALLOWED_JOB_KEYS.include? key
+ unless (ALLOWED_JOB_KEYS + refactoring_keys).include? key
raise ValidationError, "#{name} job: unknown parameter #{key}"
end
end