diff --git a/CHANGELOG b/CHANGELOG index 7dfbd2a5e1465b203dee918f41ab01e147c0cee6..c6923e8b3b27236415e65fa8ec256d40b7c83223 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,13 +57,11 @@ v 8.12.0 (unreleased) v 8.11.4 (unreleased) - Fix broken gitlab:backup:restore because of bad permissions on repo storage !6098 (Dirk Hörner) - Creating an issue through our API now emails label subscribers !5720 + - Block concurrent updates for Pipeline - Fix resolving conflicts on forks - Fix diff commenting on merge requests created prior to 8.10 - -v 8.11.4 (unreleased) - Fix issue boards leak private label names and descriptions -v 8.11.3 (unreleased) v 8.11.3 - Do not enforce using hash with hidden key in CI configuration. !6079 - Allow system info page to handle case where info is unavailable diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb index f049ed628db19863bcb6c7f6e321780f6c9fb6d8..de48a50774e2c1d931ee1d6812a1e5a991247021 100644 --- a/app/services/ci/process_pipeline_service.rb +++ b/app/services/ci/process_pipeline_service.rb @@ -10,13 +10,15 @@ module Ci create_builds! end - new_builds = - stage_indexes_of_created_builds.map do |index| - process_stage(index) - end + @pipeline.with_lock do + new_builds = + stage_indexes_of_created_builds.map do |index| + process_stage(index) + end - # Return a flag if a when builds got enqueued - new_builds.flatten.any? + # Return a flag if a when builds got enqueued + new_builds.flatten.any? + end end private