summaryrefslogtreecommitdiff
path: root/spec/factories/ci/pipelines.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/ci/pipelines.rb')
-rw-r--r--spec/factories/ci/pipelines.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/factories/ci/pipelines.rb b/spec/factories/ci/pipelines.rb
index eef5c593e0f..d68562c0aa5 100644
--- a/spec/factories/ci/pipelines.rb
+++ b/spec/factories/ci/pipelines.rb
@@ -237,7 +237,9 @@ FactoryBot.define do
trait :with_job do
after(:build) do |pipeline, evaluator|
- pipeline.builds << build(:ci_build, pipeline: pipeline, project: pipeline.project)
+ stage = build(:ci_stage, pipeline: pipeline)
+
+ pipeline.builds << build(:ci_build, pipeline: pipeline, project: pipeline.project, ci_stage: stage)
end
end