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
Boxiang Sun
gitlab-ce
Commits
78dad4cf
Commit
78dad4cf
authored
Sep 04, 2017
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
df3d4764
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
5 deletions
+25
-5
app/models/project.rb
app/models/project.rb
+5
-1
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+2
-2
config/initializers/0_inflections.rb
config/initializers/0_inflections.rb
+1
-1
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+1
-1
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+1
-0
spec/features/projects/settings/pipelines_settings_spec.rb
spec/features/projects/settings/pipelines_settings_spec.rb
+10
-0
spec/lib/gitlab/import_export/safe_model_attributes.yml
spec/lib/gitlab/import_export/safe_model_attributes.yml
+5
-0
No files found.
app/models/project.rb
View file @
78dad4cf
...
@@ -468,7 +468,11 @@ class Project < ActiveRecord::Base
...
@@ -468,7 +468,11 @@ class Project < ActiveRecord::Base
end
end
def
auto_devops_enabled?
def
auto_devops_enabled?
auto_devops
&
.
enabled?
||
current_application_settings
.
auto_devops_enabled?
if
auto_devops
auto_devops
.
enabled?
else
current_application_settings
.
auto_devops_enabled?
end
end
end
def
repository_storage_path
def
repository_storage_path
...
...
app/views/admin/application_settings/_form.html.haml
View file @
78dad4cf
...
@@ -226,8 +226,8 @@
...
@@ -226,8 +226,8 @@
Enabled Auto DevOps (Beta) for projects by default
Enabled Auto DevOps (Beta) for projects by default
.help-block
.help-block
It will automatically build, test, and deploy applications based on a predefined CI/CD configuration
It will automatically build, test, and deploy applications based on a predefined CI/CD configuration
-
# Fix this link
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'topics/autodevops/index.md'
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'user/admin_area/settings/continuous_integration'
,
anchor:
'maximum-artifacts-size'
)
.form-group
.form-group
.col-sm-offset-2.col-sm-10
.col-sm-offset-2.col-sm-10
.checkbox
.checkbox
...
...
config/initializers/0_inflections.rb
View file @
78dad4cf
...
@@ -14,6 +14,6 @@ ActiveSupport::Inflector.inflections do |inflect|
...
@@ -14,6 +14,6 @@ ActiveSupport::Inflector.inflections do |inflect|
award_emoji
award_emoji
project_statistics
project_statistics
system_note_metadata
system_note_metadata
project_
auto_devops
auto_devops
)
)
end
end
lib/gitlab/import_export/import_export.yml
View file @
78dad4cf
...
@@ -50,7 +50,7 @@ project_tree:
...
@@ -50,7 +50,7 @@ project_tree:
-
:push_event_payload
-
:push_event_payload
-
:stages
-
:stages
-
:statuses
-
:statuses
-
:
project_
auto_devops
-
:auto_devops
-
:triggers
-
:triggers
-
:pipeline_schedules
-
:pipeline_schedules
-
:services
-
:services
...
...
lib/gitlab/import_export/relation_factory.rb
View file @
78dad4cf
...
@@ -14,6 +14,7 @@ module Gitlab
...
@@ -14,6 +14,7 @@ module Gitlab
create_access_levels:
'ProtectedTag::CreateAccessLevel'
,
create_access_levels:
'ProtectedTag::CreateAccessLevel'
,
labels: :project_labels
,
labels: :project_labels
,
priorities: :label_priorities
,
priorities: :label_priorities
,
auto_devops:
'ProjectAutoDevops'
,
label: :project_label
}.
freeze
label: :project_label
}.
freeze
USER_REFERENCES
=
%w[author_id assignee_id updated_by_id user_id created_by_id last_edited_by_id merge_user_id resolved_by_id]
.
freeze
USER_REFERENCES
=
%w[author_id assignee_id updated_by_id user_id created_by_id last_edited_by_id merge_user_id resolved_by_id]
.
freeze
...
...
spec/features/projects/settings/pipelines_settings_spec.rb
View file @
78dad4cf
...
@@ -41,5 +41,15 @@ feature "Pipelines settings" do
...
@@ -41,5 +41,15 @@ feature "Pipelines settings" do
checkbox
=
find_field
(
'project_auto_cancel_pending_pipelines'
)
checkbox
=
find_field
(
'project_auto_cancel_pending_pipelines'
)
expect
(
checkbox
).
to
be_checked
expect
(
checkbox
).
to
be_checked
end
end
scenario
'update auto devops settings'
do
fill_in
(
'project_auto_devops_attributes_domain'
,
with:
'test.com'
)
page
.
choose
(
'project_auto_devops_attributes_enabled_false'
)
click_on
'Save changes'
expect
(
page
.
status_code
).
to
eq
(
200
)
expect
(
project
.
auto_devops
).
to
be_present
expect
(
project
.
auto_devops
).
not_to
be_enabled
end
end
end
end
end
spec/lib/gitlab/import_export/safe_model_attributes.yml
View file @
78dad4cf
...
@@ -224,6 +224,7 @@ Ci::Pipeline:
...
@@ -224,6 +224,7 @@ Ci::Pipeline:
-
lock_version
-
lock_version
-
auto_canceled_by_id
-
auto_canceled_by_id
-
pipeline_schedule_id
-
pipeline_schedule_id
-
config_source
Ci::Stage:
Ci::Stage:
-
id
-
id
-
name
-
name
...
@@ -462,3 +463,7 @@ Timelog:
...
@@ -462,3 +463,7 @@ Timelog:
-
user_id
-
user_id
-
created_at
-
created_at
-
updated_at
-
updated_at
ProjectAutoDevops
:
-
id
-
enabled
-
domain
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