summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-23 13:51:34 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-23 13:51:34 +0200
commit1f320edb7721bcc86d26add7ba3fcbd185a1ca06 (patch)
tree489e212e446a31139ca298920f18a231f5c028b8 /lib/ci
parent29b96d92c163d71fe5a0fdf37d6a3c57c51141cd (diff)
downloadgitlab-ce-1f320edb7721bcc86d26add7ba3fcbd185a1ca06.tar.gz
Minor refactorings in new CI configuration classes
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/gitlab_ci_yaml_processor.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb
index f0c3eae661e..e4710195687 100644
--- a/lib/ci/gitlab_ci_yaml_processor.rb
+++ b/lib/ci/gitlab_ci_yaml_processor.rb
@@ -91,6 +91,11 @@ 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"),
tag_list: job[:tags] || [],
name: name,