Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
53fa7948
Commit
53fa7948
authored
Sep 29, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add failure reason enum to CI/CD pipeline model
parent
7b5a6be4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+4
-0
ee/app/models/ee/ci/pipeline.rb
ee/app/models/ee/ci/pipeline.rb
+6
-0
spec/ee/spec/models/ee/ci/pipeline_spec.rb
spec/ee/spec/models/ee/ci/pipeline_spec.rb
+10
-0
No files found.
app/models/ci/pipeline.rb
View file @
53fa7948
...
...
@@ -71,6 +71,10 @@ module Ci
auto_devops_source:
2
}
enum
failure_reason:
{
unknown_failure:
0
}.
merge
(
EE_FAILURE_REASONS
)
state_machine
:status
,
initial: :created
do
event
:enqueue
do
transition
created: :pending
...
...
ee/app/models/ee/ci/pipeline.rb
View file @
53fa7948
module
EE
module
Ci
module
Pipeline
EE_FAILURE_REASONS
=
{
activity_limit_exceeded:
20
,
size_limit_exceeded:
21
}.
freeze
def
predefined_variables
result
=
super
result
<<
{
key:
'CI_PIPELINE_SOURCE'
,
value:
source
.
to_s
,
public:
true
}
...
...
spec/ee/spec/models/ee/ci/pipeline_spec.rb
0 → 100644
View file @
53fa7948
require
'spec_helper'
describe
Ci
::
Pipeline
do
describe
'.failure_reasons'
do
it
'contains failure reasons about exceeded limits'
do
expect
(
described_class
.
failure_reasons
)
.
to
include
'activity_limit_exceeded'
,
'size_limit_exceeded'
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment