2018-11-13 16:29:14 +00: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 23:56:20 +00:00
|
|
|
archived_failure: 9,
|
2019-10-30 21:07:58 +00:00
|
|
|
unmet_prerequisites: 10,
|
|
|
|
scheduler_failure: 11,
|
2020-02-10 12:08:59 +00:00
|
|
|
data_integrity_failure: 12,
|
2020-02-17 09:08:52 +00:00
|
|
|
forward_deployment_failure: 13,
|
2020-02-10 12:08:59 +00:00
|
|
|
insufficient_bridge_permissions: 1_001,
|
|
|
|
downstream_bridge_project_not_found: 1_002,
|
|
|
|
invalid_bridge_trigger: 1_003,
|
|
|
|
bridge_pipeline_is_child_pipeline: 1_006,
|
2020-08-10 12:09:55 +00:00
|
|
|
downstream_pipeline_creation_failed: 1_007,
|
|
|
|
secrets_provider_not_found: 1_008
|
2018-11-13 16:29:14 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2020-07-30 21:09:35 +00:00
|
|
|
|
|
|
|
CommitStatusEnums.prepend_if_ee('EE::CommitStatusEnums')
|