diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-11-16 09:38:58 -0600 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-11-16 09:38:58 -0600 |
commit | e5d4f7ff277289af8fbffd392bc216ffb2d1d873 (patch) | |
tree | 102f0a450c2476da80fa39649aed522c732b72f2 /app/models/ci/pipeline.rb | |
parent | 17d53e2bf5f9ec44d56bf92daf972007fc5f9bff (diff) | |
parent | 624ec62238c1d26ef2745c1147edffde67a2b4e6 (diff) | |
download | gitlab-ce-npm-namespace.tar.gz |
Merge branch 'master' into npm-namespacenpm-namespace
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r-- | app/models/ci/pipeline.rb | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 56010e899a4..9512ba42f67 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -58,15 +58,9 @@ module Ci after_create :keep_around_commits, unless: :importing? - enum_with_nil source: { - unknown: nil, - push: 1, - web: 2, - trigger: 3, - schedule: 4, - api: 5, - external: 6 - } + # We use `Ci::PipelineEnums.sources` here so that EE can more easily extend + # this `Hash` with new values. + enum_with_nil source: ::Ci::PipelineEnums.sources enum_with_nil config_source: { unknown_source: nil, @@ -74,10 +68,9 @@ module Ci auto_devops_source: 2 } - enum failure_reason: { - unknown_failure: 0, - config_error: 1 - } + # We use `Ci::PipelineEnums.failure_reasons` here so that EE can more easily + # extend this `Hash` with new values. + enum failure_reason: ::Ci::PipelineEnums.failure_reasons state_machine :status, initial: :created do event :enqueue do |