Merge branch 'hide-builds-feature' into 'master'
Hide builds from Project's settings when the feature is disabled Resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/13944 See merge request !3220
This commit is contained in:
commit
1525885648
|
@ -25,6 +25,7 @@ v 8.6.0 (unreleased)
|
|||
- Rewrite logo to simplify SVG code (Sean Lang)
|
||||
- Allow to use YAML anchors when parsing the `.gitlab-ci.yml` (Pascal Bach)
|
||||
- Ignore jobs that start with `.` (hidden jobs)
|
||||
- Hide builds from project's settings when the feature is disabled
|
||||
- Allow to pass name of created artifacts archive in `.gitlab-ci.yml`
|
||||
- Refactor and greatly improve search performance
|
||||
- Add support for cross-project label references
|
||||
|
|
|
@ -3,3 +3,16 @@ class @ProjectNew
|
|||
$('.project-edit-container').on 'ajax:before', =>
|
||||
$('.project-edit-container').hide()
|
||||
$('.save-project-loader').show()
|
||||
@toggleSettings()
|
||||
@toggleSettingsOnclick()
|
||||
|
||||
|
||||
toggleSettings: ->
|
||||
checked = $("#project_builds_enabled").prop("checked")
|
||||
if checked
|
||||
$('.builds-feature').show()
|
||||
else
|
||||
$('.builds-feature').hide()
|
||||
|
||||
toggleSettingsOnclick: ->
|
||||
$("#project_builds_enabled").on 'click', @toggleSettings
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
%fieldset.builds-feature
|
||||
%legend
|
||||
Builds:
|
||||
.form-group
|
||||
.col-sm-offset-2.col-sm-10
|
||||
%p Get recent application code using the following command:
|
||||
.radio
|
||||
= f.label :build_allow_git_fetch_false do
|
||||
= f.radio_button :build_allow_git_fetch, 'false'
|
||||
%strong git clone
|
||||
%br
|
||||
%span.descr Slower but makes sure you have a clean dir before every build
|
||||
.radio
|
||||
= f.label :build_allow_git_fetch_true do
|
||||
= f.radio_button :build_allow_git_fetch, 'true'
|
||||
%strong git fetch
|
||||
%br
|
||||
%span.descr Faster
|
||||
|
||||
.form-group
|
||||
= f.label :build_timeout_in_minutes, 'Timeout', class: 'control-label'
|
||||
.col-sm-10
|
||||
= f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0'
|
||||
%p.help-block per build in minutes
|
||||
.form-group
|
||||
= f.label :build_coverage_regex, "Test coverage parsing", class: 'control-label'
|
||||
.col-sm-10
|
||||
.input-group
|
||||
%span.input-group-addon /
|
||||
= f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered'
|
||||
%span.input-group-addon /
|
||||
%p.help-block
|
||||
We will use this regular expression to find test coverage output in build trace.
|
||||
Leave blank if you want to disable this feature
|
||||
.bs-callout.bs-callout-info
|
||||
%p Below are examples of regex for existing tools:
|
||||
%ul
|
||||
%li
|
||||
Simplecov (Ruby) -
|
||||
%code \(\d+.\d+\%\) covered
|
||||
%li
|
||||
pytest-cov (Python) -
|
||||
%code \d+\%\s*$
|
||||
%li
|
||||
phpunit --coverage-text --colors=never (PHP) -
|
||||
%code ^\s*Lines:\s*\d+.\d+\%
|
||||
|
||||
.form-group
|
||||
.col-sm-offset-2.col-sm-10
|
||||
.checkbox
|
||||
= f.label :public_builds do
|
||||
= f.check_box :public_builds
|
||||
%strong Public builds
|
||||
.help-block Allow everyone to access builds for Public and Internal projects
|
||||
|
||||
.form-group
|
||||
= f.label :runners_token, "Runners token", class: 'control-label'
|
||||
.col-sm-10
|
||||
= f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89'
|
||||
%p.help-block The secure token used to checkout project.
|
|
@ -84,6 +84,8 @@
|
|||
%br
|
||||
%span.descr Share code pastes with others out of git repository
|
||||
|
||||
= render 'builds_settings', f: f
|
||||
|
||||
%fieldset.features
|
||||
%legend
|
||||
Project avatar:
|
||||
|
@ -110,69 +112,6 @@
|
|||
%hr
|
||||
= link_to 'Remove avatar', namespace_project_avatar_path(@project.namespace, @project), data: { confirm: "Project avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
|
||||
|
||||
%fieldset.features
|
||||
%legend
|
||||
Continuous Integration
|
||||
.form-group
|
||||
.col-sm-offset-2.col-sm-10
|
||||
%p Get recent application code using the following command:
|
||||
.radio
|
||||
= f.label :build_allow_git_fetch_false do
|
||||
= f.radio_button :build_allow_git_fetch, 'false'
|
||||
%strong git clone
|
||||
%br
|
||||
%span.descr Slower but makes sure you have a clean dir before every build
|
||||
.radio
|
||||
= f.label :build_allow_git_fetch_true do
|
||||
= f.radio_button :build_allow_git_fetch, 'true'
|
||||
%strong git fetch
|
||||
%br
|
||||
%span.descr Faster
|
||||
|
||||
.form-group
|
||||
= f.label :build_timeout_in_minutes, 'Timeout', class: 'control-label'
|
||||
.col-sm-10
|
||||
= f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0'
|
||||
%p.help-block per build in minutes
|
||||
.form-group
|
||||
= f.label :build_coverage_regex, "Test coverage parsing", class: 'control-label'
|
||||
.col-sm-10
|
||||
.input-group
|
||||
%span.input-group-addon /
|
||||
= f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered'
|
||||
%span.input-group-addon /
|
||||
%p.help-block
|
||||
We will use this regular expression to find test coverage output in build trace.
|
||||
Leave blank if you want to disable this feature
|
||||
.bs-callout.bs-callout-info
|
||||
%p Below are examples of regex for existing tools:
|
||||
%ul
|
||||
%li
|
||||
Simplecov (Ruby) -
|
||||
%code \(\d+.\d+\%\) covered
|
||||
%li
|
||||
pytest-cov (Python) -
|
||||
%code \d+\%\s*$
|
||||
%li
|
||||
phpunit --coverage-text --colors=never (PHP) -
|
||||
%code ^\s*Lines:\s*\d+.\d+\%
|
||||
|
||||
.form-group
|
||||
.col-sm-offset-2.col-sm-10
|
||||
.checkbox
|
||||
= f.label :public_builds do
|
||||
= f.check_box :public_builds
|
||||
%strong Public builds
|
||||
.help-block Allow everyone to access builds for Public and Internal projects
|
||||
|
||||
%fieldset.features
|
||||
%legend
|
||||
Advanced settings
|
||||
.form-group
|
||||
= f.label :runners_token, "CI token", class: 'control-label'
|
||||
.col-sm-10
|
||||
= f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89'
|
||||
%p.help-block The secure token used to checkout project.
|
||||
|
||||
.form-actions
|
||||
= f.submit 'Save changes', class: "btn btn-save"
|
||||
|
|
Loading…
Reference in New Issue