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
5a2a0b28
Commit
5a2a0b28
authored
Dec 04, 2017
by
bikebilly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Auto DevOps checkboxes - frontend
parent
89d3fcd1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
146 deletions
+6
-146
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-7
app/assets/javascripts/projects/ci_cd_settings_bundle.js
app/assets/javascripts/projects/ci_cd_settings_bundle.js
+0
-19
app/views/projects/pipelines_settings/_show.html.haml
app/views/projects/pipelines_settings/_show.html.haml
+6
-17
doc/topics/autodevops/img/auto_devops_settings.png
doc/topics/autodevops/img/auto_devops_settings.png
+0
-0
doc/topics/autodevops/index.md
doc/topics/autodevops/index.md
+0
-2
spec/features/projects/settings/pipelines_settings_spec.rb
spec/features/projects/settings/pipelines_settings_spec.rb
+0
-101
No files found.
app/assets/javascripts/dispatcher.js
View file @
5a2a0b28
...
...
@@ -522,13 +522,6 @@ import ProjectVariables from './project_variables';
case
'
projects:settings:ci_cd:show
'
:
// Initialize expandable settings panels
initSettingsPanels
();
import
(
/* webpackChunkName: "ci-cd-settings" */
'
./projects/ci_cd_settings_bundle
'
)
.
then
(
ciCdSettings
=>
ciCdSettings
.
default
())
.
catch
((
err
)
=>
{
Flash
(
s__
(
'
ProjectSettings|Problem setting up the CI/CD settings JavaScript
'
));
throw
err
;
});
case
'
groups:settings:ci_cd:show
'
:
new
ProjectVariables
();
break
;
...
...
app/assets/javascripts/projects/ci_cd_settings_bundle.js
deleted
100644 → 0
View file @
89d3fcd1
function
updateAutoDevopsRadios
(
radioWrappers
)
{
radioWrappers
.
forEach
((
radioWrapper
)
=>
{
const
radio
=
radioWrapper
.
querySelector
(
'
.js-auto-devops-enable-radio
'
);
const
runPipelineCheckboxWrapper
=
radioWrapper
.
querySelector
(
'
.js-run-auto-devops-pipeline-checkbox-wrapper
'
);
const
runPipelineCheckbox
=
radioWrapper
.
querySelector
(
'
.js-run-auto-devops-pipeline-checkbox
'
);
if
(
runPipelineCheckbox
)
{
runPipelineCheckbox
.
checked
=
radio
.
checked
;
runPipelineCheckboxWrapper
.
classList
.
toggle
(
'
hide
'
,
!
radio
.
checked
);
}
});
}
export
default
function
initCiCdSettings
()
{
const
radioWrappers
=
document
.
querySelectorAll
(
'
.js-auto-devops-enable-radio-wrapper
'
);
radioWrappers
.
forEach
(
radioWrapper
=>
radioWrapper
.
addEventListener
(
'
change
'
,
()
=>
updateAutoDevopsRadios
(
radioWrappers
)),
);
}
app/views/projects/pipelines_settings/_show.html.haml
View file @
5a2a0b28
...
...
@@ -6,46 +6,35 @@
%h5
Auto DevOps (Beta)
%p
Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration.
This will happen starting with the next event (e.g.: push) that occurs to the project.
=
link_to
'Learn more about Auto DevOps'
,
help_page_path
(
'topics/autodevops/index.md'
)
-
message
=
auto_devops_warning_message
(
@project
)
-
if
message
%p
.settings-message.text-center
=
message
.
html_safe
=
f
.
fields_for
:auto_devops_attributes
,
@auto_devops
do
|
form
|
.radio
.js-auto-devops-enable-radio-wrapper
.radio
=
form
.
label
:enabled_true
do
=
form
.
radio_button
:enabled
,
'true'
,
class:
'js-auto-devops-enable-radio'
=
form
.
radio_button
:enabled
,
'true'
%strong
Enable Auto DevOps
%br
%span
.descr
The Auto DevOps pipeline configuration will be used when there is no
<code>
.gitlab-ci.yml
</code>
in the project.
-
if
show_run_auto_devops_pipeline_checkbox_for_explicit_setting?
(
@project
)
.checkbox.hide.js-run-auto-devops-pipeline-checkbox-wrapper
=
label_tag
'project[run_auto_devops_pipeline_explicit]'
do
=
check_box_tag
'project[run_auto_devops_pipeline_explicit]'
,
true
,
false
,
class:
'js-run-auto-devops-pipeline-checkbox'
=
s_
(
'ProjectSettings|Immediately run a pipeline on the default branch'
)
.radio
.js-auto-devops-enable-radio-wrapper
.radio
=
form
.
label
:enabled_false
do
=
form
.
radio_button
:enabled
,
'false'
,
class:
'js-auto-devops-enable-radio'
=
form
.
radio_button
:enabled
,
'false'
%strong
Disable Auto DevOps
%br
%span
.descr
An explicit
<code>
.gitlab-ci.yml
</code>
needs to be specified before you can begin using Continuous Integration and Delivery.
.radio
.js-auto-devops-enable-radio-wrapper
.radio
=
form
.
label
:enabled_
do
=
form
.
radio_button
:enabled
,
''
,
class:
'js-auto-devops-enable-radio'
=
form
.
radio_button
:enabled
,
''
%strong
Instance default (
#{
current_application_settings
.
auto_devops_enabled?
?
'enabled'
:
'disabled'
}
)
%br
%span
.descr
Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific
<code>
.gitlab-ci.yml
</code>
.
-
if
show_run_auto_devops_pipeline_checkbox_for_instance_setting?
(
@project
)
.checkbox.hide.js-run-auto-devops-pipeline-checkbox-wrapper
=
label_tag
'project[run_auto_devops_pipeline_implicit]'
do
=
check_box_tag
'project[run_auto_devops_pipeline_implicit]'
,
true
,
false
,
class:
'js-run-auto-devops-pipeline-checkbox'
=
s_
(
'ProjectSettings|Immediately run a pipeline on the default branch'
)
%p
You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages.
=
form
.
text_field
:domain
,
class:
'form-control'
,
placeholder:
'domain.com'
...
...
doc/topics/autodevops/img/auto_devops_settings.png
View replaced file @
89d3fcd1
View file @
5a2a0b28
66.3 KB
|
W:
|
H:
93 KB
|
W:
|
H:
2-up
Swipe
Onion skin
doc/topics/autodevops/index.md
View file @
5a2a0b28
...
...
@@ -129,8 +129,6 @@ full use of Auto DevOps. If this is your fist time, we recommend you follow the
1.
Go to your project's
**Settings > CI/CD > General pipelines settings**
and
find the Auto DevOps section
1.
Select "Enable Auto DevOps"
1.
After selecting an option to enable Auto DevOps, a checkbox will appear below
so you can immediately run a pipeline on the default branch
1.
Optionally, but recommended, add in the
[
base domain
](
#auto-devops-base-domain
)
that will be used by Kubernetes to deploy your application
1.
Hit
**Save changes**
for the changes to take effect
...
...
spec/features/projects/settings/pipelines_settings_spec.rb
View file @
5a2a0b28
...
...
@@ -59,107 +59,6 @@ feature "Pipelines settings" do
expect
(
project
.
auto_devops
).
to
be_present
expect
(
project
.
auto_devops
).
not_to
be_enabled
end
describe
'Immediately run pipeline checkbox option'
,
:js
do
context
'when auto devops is set to instance default (enabled)'
do
before
do
stub_application_setting
(
auto_devops_enabled:
true
)
project
.
create_auto_devops!
(
enabled:
nil
)
visit
project_settings_ci_cd_path
(
project
)
end
it
'does not show checkboxes on page-load'
do
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper.hide'
,
count:
1
,
visible:
false
)
end
it
'selecting explicit disabled hides all checkboxes'
do
page
.
choose
(
'project_auto_devops_attributes_enabled_false'
)
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper.hide'
,
count:
1
,
visible:
false
)
end
it
'selecting explicit enabled hides all checkboxes because we are already enabled'
do
page
.
choose
(
'project_auto_devops_attributes_enabled_true'
)
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper.hide'
,
count:
1
,
visible:
false
)
end
end
context
'when auto devops is set to instance default (disabled)'
do
before
do
stub_application_setting
(
auto_devops_enabled:
false
)
project
.
create_auto_devops!
(
enabled:
nil
)
visit
project_settings_ci_cd_path
(
project
)
end
it
'does not show checkboxes on page-load'
do
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper.hide'
,
count:
1
,
visible:
false
)
end
it
'selecting explicit disabled hides all checkboxes'
do
page
.
choose
(
'project_auto_devops_attributes_enabled_false'
)
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper.hide'
,
count:
1
,
visible:
false
)
end
it
'selecting explicit enabled shows a checkbox'
do
page
.
choose
(
'project_auto_devops_attributes_enabled_true'
)
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper:not(.hide)'
,
count:
1
)
end
end
context
'when auto devops is set to explicit disabled'
do
before
do
stub_application_setting
(
auto_devops_enabled:
true
)
project
.
create_auto_devops!
(
enabled:
false
)
visit
project_settings_ci_cd_path
(
project
)
end
it
'does not show checkboxes on page-load'
do
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper.hide'
,
count:
2
,
visible:
false
)
end
it
'selecting explicit enabled shows a checkbox'
do
page
.
choose
(
'project_auto_devops_attributes_enabled_true'
)
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper:not(.hide)'
,
count:
1
)
end
it
'selecting instance default (enabled) shows a checkbox'
do
page
.
choose
(
'project_auto_devops_attributes_enabled_'
)
expect
(
page
).
to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper:not(.hide)'
,
count:
1
)
end
end
context
'when auto devops is set to explicit enabled'
do
before
do
stub_application_setting
(
auto_devops_enabled:
false
)
project
.
create_auto_devops!
(
enabled:
true
)
visit
project_settings_ci_cd_path
(
project
)
end
it
'does not have any checkboxes'
do
expect
(
page
).
not_to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper'
,
visible:
false
)
end
end
context
'when master contains a .gitlab-ci.yml file'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
project
.
repository
.
create_file
(
user
,
'.gitlab-ci.yml'
,
"script: ['test']"
,
message:
'test'
,
branch_name:
project
.
default_branch
)
stub_application_setting
(
auto_devops_enabled:
true
)
project
.
create_auto_devops!
(
enabled:
false
)
visit
project_settings_ci_cd_path
(
project
)
end
it
'does not have any checkboxes'
do
expect
(
page
).
not_to
have_selector
(
'.js-run-auto-devops-pipeline-checkbox-wrapper'
,
visible:
false
)
end
end
end
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