diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-25 15:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-25 15:09:06 +0300 |
commit | cc1e91be1cd930f58baebb89f2ff1893045a2aea (patch) | |
tree | ad35ee30978a657f17d87fcd569f35337b96da12 /lib/gitlab/ci/pipeline | |
parent | 012ed4e4f69ab58f9d9b58140865a734fa5a9c88 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/pipeline')
-rw-r--r-- | lib/gitlab/ci/pipeline/chain/cancel_pending_pipelines.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/cancel_pending_pipelines.rb b/lib/gitlab/ci/pipeline/chain/cancel_pending_pipelines.rb index f637001f9f8..9c12d46cede 100644 --- a/lib/gitlab/ci/pipeline/chain/cancel_pending_pipelines.rb +++ b/lib/gitlab/ci/pipeline/chain/cancel_pending_pipelines.rb @@ -40,7 +40,13 @@ module Gitlab ::Ci::Pipeline .id_in(pipeline_ids) .with_only_interruptible_builds - .each { |cancelable| cancelable.auto_cancel_running(pipeline) } + .each do |cancelable_pipeline| + # cascade_to_children not needed because we iterate through descendants here + cancelable_pipeline.cancel_running( + auto_canceled_by_pipeline_id: pipeline.id, + cascade_to_children: false + ) + end end end end |