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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
aac8d1f3
Commit
aac8d1f3
authored
May 28, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check for nil auto_devops in Projects::UpdateService
parent
6e354cb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/services/projects/update_service.rb
app/services/projects/update_service.rb
+1
-1
spec/services/projects/update_service_spec.rb
spec/services/projects/update_service_spec.rb
+4
-0
No files found.
app/services/projects/update_service.rb
View file @
aac8d1f3
...
...
@@ -36,7 +36,7 @@ module Projects
end
def
run_auto_devops_pipeline?
return
false
if
project
.
repository
.
gitlab_ci_yml
||
!
project
.
auto_devops
.
previous_changes
.
include?
(
'enabled'
)
return
false
if
project
.
repository
.
gitlab_ci_yml
||
project
.
auto_devops
.
nil?
||
!
project
.
auto_devops
.
previous_changes
.
include?
(
'enabled'
)
project
.
auto_devops
.
enabled?
||
(
project
.
auto_devops
.
enabled
.
nil?
&&
Gitlab
::
CurrentSettings
.
auto_devops_enabled?
)
end
...
...
spec/services/projects/update_service_spec.rb
View file @
aac8d1f3
...
...
@@ -275,6 +275,10 @@ describe Projects::UpdateService do
it
{
is_expected
.
to
eq
(
false
)
}
end
context
'when auto devops is nil'
do
it
{
is_expected
.
to
eq
(
false
)
}
end
context
'when auto devops is explicitly enabled'
do
before
do
project
.
create_auto_devops!
(
enabled:
true
)
...
...
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