42ca9c6f0d
Introduces a new status for builds between :created and :pending that will be used when builds require one or more prerequisite actions to be completed before being picked up by a runner (such as creating Kubernetes resources before deploying). The existing :created > :pending transition is unchanged, so only builds that require preparation will use the :preparing status.
61 lines
1.1 KiB
Ruby
61 lines
1.1 KiB
Ruby
FactoryBot.define do
|
|
factory :commit_status, class: CommitStatus do
|
|
name 'default'
|
|
stage 'test'
|
|
stage_idx 0
|
|
status 'success'
|
|
description 'commit status'
|
|
pipeline factory: :ci_pipeline_with_one_job
|
|
started_at 'Tue, 26 Jan 2016 08:21:42 +0100'
|
|
finished_at 'Tue, 26 Jan 2016 08:23:42 +0100'
|
|
|
|
trait :success do
|
|
status 'success'
|
|
end
|
|
|
|
trait :failed do
|
|
status 'failed'
|
|
end
|
|
|
|
trait :canceled do
|
|
status 'canceled'
|
|
end
|
|
|
|
trait :skipped do
|
|
status 'skipped'
|
|
end
|
|
|
|
trait :running do
|
|
status 'running'
|
|
end
|
|
|
|
trait :pending do
|
|
status 'pending'
|
|
end
|
|
|
|
trait :preparing do
|
|
status 'preparing'
|
|
end
|
|
|
|
trait :created do
|
|
status 'created'
|
|
end
|
|
|
|
trait :manual do
|
|
status 'manual'
|
|
end
|
|
|
|
trait :scheduled do
|
|
status 'scheduled'
|
|
end
|
|
|
|
after(:build) do |build, evaluator|
|
|
build.project = build.pipeline.project
|
|
end
|
|
|
|
factory :generic_commit_status, class: GenericCommitStatus do
|
|
name 'generic'
|
|
description 'external commit status'
|
|
end
|
|
end
|
|
end
|