gitlab-org--gitlab-foss/app/models/commit_status_enums.rb
Tiger 00f0d356b7 Create framework for build prerequisites
Introduces the concept of Prerequisites for a CI build.
If a build has unmet prerequisites it will go through the
:preparing state before being made available to a runner.

There are no actual prerequisites yet, so current
behaviour is unchanged.
2019-03-20 12:04:40 +11:00

21 lines
518 B
Ruby

# frozen_string_literal: true
module CommitStatusEnums
# Returns the Hash to use for creating the `failure_reason` enum for
# `CommitStatus`.
def self.failure_reasons
{
unknown_failure: nil,
script_failure: 1,
api_failure: 2,
stuck_or_timeout_failure: 3,
runner_system_failure: 4,
missing_dependency_failure: 5,
runner_unsupported: 6,
stale_schedule: 7,
job_execution_timeout: 8,
archived_failure: 9,
unmet_prerequisites: 10
}
end
end