2018-11-13 11:29:14 -05:00
|
|
|
# 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,
|
2019-03-03 18:56:20 -05:00
|
|
|
archived_failure: 9,
|
|
|
|
unmet_prerequisites: 10
|
2018-11-13 11:29:14 -05:00
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2019-09-13 09:26:31 -04:00
|
|
|
|
|
|
|
CommitStatusEnums.prepend_if_ee('EE::CommitStatusEnums')
|