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>2020-11-27 18:09:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-27 18:09:34 +0300
commit4c39dd11dcbdab4fdd9424a62320a1fc773c2918 (patch)
treeb3bc6139fdc8d1e3254304222f06f82821c5aa64 /spec/factories/ci
parent95ff19a65c5236863e4c7c7e198bfc1e2fa70f07 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories/ci')
-rw-r--r--spec/factories/ci/pipelines.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/factories/ci/pipelines.rb b/spec/factories/ci/pipelines.rb
index ea22fba37c9..09dcf026aa3 100644
--- a/spec/factories/ci/pipelines.rb
+++ b/spec/factories/ci/pipelines.rb
@@ -16,6 +16,7 @@ FactoryBot.define do
transient { head_pipeline_of { nil } }
transient { child_of { nil } }
+ transient { upstream_of { nil } }
after(:build) do |pipeline, evaluator|
if evaluator.child_of
@@ -30,9 +31,12 @@ FactoryBot.define do
if evaluator.child_of
bridge = create(:ci_bridge, pipeline: evaluator.child_of)
- create(:ci_sources_pipeline,
- source_job: bridge,
- pipeline: pipeline)
+ create(:ci_sources_pipeline, source_job: bridge, pipeline: pipeline)
+ end
+
+ if evaluator.upstream_of
+ bridge = create(:ci_bridge, pipeline: pipeline)
+ create(:ci_sources_pipeline, source_job: bridge, pipeline: evaluator.upstream_of)
end
end