summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-12-08 14:15:33 +0000
committerLUKE BENNETT <lbennett@gitlab.com>2017-12-13 13:48:13 +0000
commit8599126a35979235329702c984f132aec72dcd1e (patch)
tree935fb099bda62aab0b8bbbb95d5a577dd461c103 /app
parent0f04fa2859d436e78de2f6d30e01b2134a094103 (diff)
downloadgitlab-ce-8599126a35979235329702c984f132aec72dcd1e.tar.gz
Merge branch 'fix/gb/fix-pipeline-build-chain-tag-evaluation' into 'master'
Fix invalid pipeline build chain tag evaluation Closes #40944 See merge request gitlab-org/gitlab-ce!15805 (cherry picked from commit 103269b9a6d92ff3d4d0f3b69e4653e3f0ef7744) b30e0e06 Fix invalid pipeline build chain tag evaluation ad3be46b Implement and use Gitlab::Ci::Pipeline::Chain::Command 865341ac Fix a bug of before_sha being inproperly evaluated to `checkout_sha` b5f6a5f9 Add Chain::Command specs 99101f94 Fix Rubocop
Diffstat (limited to 'app')
-rw-r--r--app/services/ci/create_pipeline_service.rb25
1 files changed, 13 insertions, 12 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb
index 1e5f2ed4dd2..85db2760e23 100644
--- a/app/services/ci/create_pipeline_service.rb
+++ b/app/services/ci/create_pipeline_service.rb
@@ -12,18 +12,19 @@ module Ci
def execute(source, ignore_skip_ci: false, save_on_errors: true, trigger_request: nil, schedule: nil, &block)
@pipeline = Ci::Pipeline.new
- command = OpenStruct.new(source: source,
- origin_ref: params[:ref],
- checkout_sha: params[:checkout_sha],
- after_sha: params[:after],
- before_sha: params[:before],
- trigger_request: trigger_request,
- schedule: schedule,
- ignore_skip_ci: ignore_skip_ci,
- save_incompleted: save_on_errors,
- seeds_block: block,
- project: project,
- current_user: current_user)
+ command = Gitlab::Ci::Pipeline::Chain::Command.new(
+ source: source,
+ origin_ref: params[:ref],
+ checkout_sha: params[:checkout_sha],
+ after_sha: params[:after],
+ before_sha: params[:before],
+ trigger_request: trigger_request,
+ schedule: schedule,
+ ignore_skip_ci: ignore_skip_ci,
+ save_incompleted: save_on_errors,
+ seeds_block: block,
+ project: project,
+ current_user: current_user)
sequence = Gitlab::Ci::Pipeline::Chain::Sequence
.new(pipeline, command, SEQUENCE)