summaryrefslogtreecommitdiff
path: root/app/models/ci/pipeline.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-22 12:47:26 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-22 12:51:46 +0100
commita952c84ffdf736e1c4fae39ee38d7f8a75093c3b (patch)
treec52d6e1f5d64177d90264fd049f4aed223f6c432 /app/models/ci/pipeline.rb
parent2e3dab38295b7c36ab100f20c654fdfaf9b00885 (diff)
downloadgitlab-ce-revert-enum-changes.tar.gz
Revert changes to enums.revert-enum-changes
All enums has to be backported to CE.
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r--app/models/ci/pipeline.rb26
1 files changed, 20 insertions, 6 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 9512ba42f67..c97ef362294 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -58,19 +58,33 @@ module Ci
after_create :keep_around_commits, unless: :importing?
- # 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
+ # All EE-only enums has to be backported to CE
+ enum_with_nil source: {
+ unknown: nil,
+ push: 1,
+ web: 2,
+ trigger: 3,
+ schedule: 4,
+ api: 5,
+ external: 6,
+ pipeline: 7, # EE-only
+ chat: 8 # EE-only
+ }
+ # All EE-only enums has to be backported to CE
enum_with_nil config_source: {
unknown_source: nil,
repository_source: 1,
auto_devops_source: 2
}
- # 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
+ # All EE-only enums has to be backported to CE
+ enum failure_reason: {
+ unknown_failure: 0,
+ config_error: 1,
+ activity_limit_exceeded: 20, # EE-only
+ size_limit_exceeded: 21 # EE-only
+ }
state_machine :status, initial: :created do
event :enqueue do