diff options
Diffstat (limited to 'app/models/ci/pipeline_enums.rb')
-rw-r--r-- | app/models/ci/pipeline_enums.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/app/models/ci/pipeline_enums.rb b/app/models/ci/pipeline_enums.rb new file mode 100644 index 00000000000..8d8d16e2ec1 --- /dev/null +++ b/app/models/ci/pipeline_enums.rb @@ -0,0 +1,28 @@ +# 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, + external: 6 + } + end + end +end |