Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-28 03:12:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-28 03:12:20 +0300
commite74c47fb1bd1c137145e19143b0f77cf420990f4 (patch)
tree1ea75375e2d46a0fcc107c336759454c24a332e4 /app/workers
parente49c47d3bc5603e8e9d6ad40fc7fccae9f885843 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/all_queues.yml9
-rw-r--r--app/workers/ci/create_cross_project_pipeline_worker.rb19
2 files changed, 28 insertions, 0 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index 56d67c8088f..446cba267ad 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -1929,6 +1929,15 @@
:weight: 4
:idempotent: true
:tags: []
+- :name: pipeline_default:ci_create_cross_project_pipeline
+ :worker_name: Ci::CreateCrossProjectPipelineWorker
+ :feature_category: :continuous_integration
+ :has_external_dependencies: false
+ :urgency: :low
+ :resource_boundary: :cpu
+ :weight: 3
+ :idempotent: false
+ :tags: []
- :name: pipeline_default:ci_create_downstream_pipeline
:worker_name: Ci::CreateDownstreamPipelineWorker
:feature_category: :continuous_integration
diff --git a/app/workers/ci/create_cross_project_pipeline_worker.rb b/app/workers/ci/create_cross_project_pipeline_worker.rb
new file mode 100644
index 00000000000..4881ee12e5c
--- /dev/null
+++ b/app/workers/ci/create_cross_project_pipeline_worker.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Ci
+ class CreateCrossProjectPipelineWorker # rubocop:disable Scalability/IdempotentWorker
+ include ::ApplicationWorker
+ include ::PipelineQueue
+
+ sidekiq_options retry: 3
+ worker_resource_boundary :cpu
+
+ def perform(bridge_id)
+ ::Ci::Bridge.find_by_id(bridge_id).try do |bridge|
+ ::Ci::CreateDownstreamPipelineService
+ .new(bridge.project, bridge.user)
+ .execute(bridge)
+ end
+ end
+ end
+end