2018-11-13 16:29:14 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
module PipelineEnums
|
|
|
|
# Returns the `Hash` to use for creating the `failure_reason` enum for
|
|
|
|
# `Ci::Pipeline`.
|
|
|
|
def self.failure_reasons
|
|
|
|
{
|
|
|
|
unknown_failure: 0,
|
|
|
|
config_error: 1
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
# Returns the `Hash` to use for creating the `sources` enum for
|
|
|
|
# `Ci::Pipeline`.
|
|
|
|
def self.sources
|
|
|
|
{
|
|
|
|
unknown: nil,
|
|
|
|
push: 1,
|
|
|
|
web: 2,
|
|
|
|
trigger: 3,
|
|
|
|
schedule: 4,
|
|
|
|
api: 5,
|
2018-12-05 06:57:00 +00:00
|
|
|
external: 6,
|
2019-02-20 21:29:48 +00:00
|
|
|
chat: 8,
|
2019-02-25 11:05:26 +00:00
|
|
|
merge_request_event: 10
|
2018-11-13 16:29:14 +00:00
|
|
|
}
|
|
|
|
end
|
2018-12-13 14:12:36 +00:00
|
|
|
|
|
|
|
# Returns the `Hash` to use for creating the `config_sources` enum for
|
|
|
|
# `Ci::Pipeline`.
|
|
|
|
def self.config_sources
|
|
|
|
{
|
|
|
|
unknown_source: nil,
|
|
|
|
repository_source: 1,
|
|
|
|
auto_devops_source: 2
|
|
|
|
}
|
|
|
|
end
|
2018-11-13 16:29:14 +00:00
|
|
|
end
|
|
|
|
end
|