diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-08 13:35:36 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-08 14:01:15 +0300 |
commit | ad3be46b9fe7d6d42b30d257a923b0070f79da94 (patch) | |
tree | 6684c983fb05c6bccdf88f4da62f5c9f74b17010 /app/services | |
parent | b30e0e0691716c2ef0b858b81dd5cef8d4728c59 (diff) |
Implement and use Gitlab::Ci::Pipeline::Chain::Command
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/create_pipeline_service.rb | 25 |
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) |