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
5547baa3
Commit
5547baa3
authored
Sep 01, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec
parent
ce7c0ac3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
spec/support/cycle_analytics_helpers.rb
spec/support/cycle_analytics_helpers.rb
+4
-2
No files found.
app/models/ci/build.rb
View file @
5547baa3
...
...
@@ -26,7 +26,7 @@ module Ci
validates
:coverage
,
numericality:
true
,
allow_blank:
true
validates
:ref
,
presence:
true
validates
:protected
,
inclusion:
{
in:
[
true
,
false
]
},
on: :create
validates
:protected
,
inclusion:
{
in:
[
true
,
false
]
},
on: :create
scope
:unstarted
,
->
()
{
where
(
runner_id:
nil
)
}
scope
:ignore_failures
,
->
()
{
where
(
allow_failure:
false
)
}
...
...
app/models/ci/pipeline.rb
View file @
5547baa3
...
...
@@ -36,7 +36,7 @@ module Ci
validates
:sha
,
presence:
{
unless: :importing?
}
validates
:ref
,
presence:
{
unless: :importing?
}
validates
:status
,
presence:
{
unless: :importing?
}
validates
:protected
,
inclusion:
{
in:
[
true
,
false
],
unless: :importing?
},
on: :create
validates
:protected
,
inclusion:
{
in:
[
true
,
false
],
unless: :importing?
},
on: :create
validate
:valid_commit_sha
,
unless: :importing?
after_create
:keep_around_commits
,
unless: :importing?
...
...
spec/support/cycle_analytics_helpers.rb
View file @
5547baa3
...
...
@@ -80,7 +80,8 @@ module CycleAnalyticsHelpers
sha:
project
.
repository
.
commit
(
'master'
).
sha
,
ref:
'master'
,
source: :push
,
project:
project
)
project:
project
,
protected:
true
)
end
def
new_dummy_job
(
environment
)
...
...
@@ -93,7 +94,8 @@ module CycleAnalyticsHelpers
ref:
'master'
,
tag:
false
,
name:
'dummy'
,
pipeline:
dummy_pipeline
)
pipeline:
dummy_pipeline
,
protected:
true
)
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