diff options
author | Sean McGivern <sean@gitlab.com> | 2019-07-23 14:57:30 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-07-23 14:57:30 +0300 |
commit | b2e4a7957ab7ae8e4ed5ae1fd4c0f3f826f26777 (patch) | |
tree | 69563679e9d5093a8ec884a9f3b6ba5962176f82 /lib | |
parent | 69adeb3718099de8bbf3090251d0061e90cada14 (diff) | |
parent | 41b8dca877ba790cd56677dc6405e16b631f9854 (diff) |
Merge branch 'gsemet/gitlab-ce-gsemet-master-patch-33258' into 'master'
Multiple pipeline support for Build status
See merge request gitlab-org/gitlab-ce!30828
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/commit_statuses.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 08b4f8db8b0..d58a5e214ed 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -52,6 +52,7 @@ module API optional :name, type: String, desc: 'A string label to differentiate this status from the status of other systems. Default: "default"' optional :context, type: String, desc: 'A string label to differentiate this status from the status of other systems. Default: "default"' optional :coverage, type: Float, desc: 'The total code coverage' + optional :pipeline_id, type: Integer, desc: 'An existing pipeline ID, when multiple pipelines on the same commit SHA have been triggered' end # rubocop: disable CodeReuse/ActiveRecord post ':id/statuses/:sha' do @@ -73,7 +74,8 @@ module API name = params[:name] || params[:context] || 'default' - pipeline = @project.pipeline_for(ref, commit.sha) + pipeline = @project.pipeline_for(ref, commit.sha, params[:pipeline_id]) + unless pipeline pipeline = @project.ci_pipelines.create!( source: :external, |