diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-20 13:59:43 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-20 13:59:43 +0000 |
commit | 6623d36b65a87f8db9d35a83f832ee2e0564f8b1 (patch) | |
tree | 65b290a14f3530df312114292ff8f48a964a0aba /app/views | |
parent | f3d03af4215763d6c51c4b26702200ba679baded (diff) | |
parent | 545cecb28c02a2350b6ecb7a8c0080f9663734d3 (diff) | |
download | gitlab-ce-6623d36b65a87f8db9d35a83f832ee2e0564f8b1.tar.gz |
Merge branch '15343-build-settiings' into 'master'
Resolve "Move Build badges settings to Builds page (or Builds settings)"
## What does this MR do?
Removes pipeline settings section from project settings & creates a new pipelines settings page
Adds builds badge to pipelines settings page & removes badge page
## Are there points in the code the reviewer needs to double check?
All Rails updates -> particularly `builds_controller.rb` and `routes`
Spacing needs to be updated across all settings pages and will be in a separate MR (https://gitlab.com/gitlab-org/gitlab-ce/issues/19827)
## What are the relevant issue numbers?
Closes #15343
Part of #18920
## Screenshots (if relevant)
![Screen_Shot_2016-07-19_at_5.47.29_AM](/uploads/48e6d203de4cbe0b697280128695d980/Screen_Shot_2016-07-19_at_5.47.29_AM.png)
![Screen_Shot_2016-07-14_at_9.25.13_AM](/uploads/59118440f3e7bb903f44260abb119376/Screen_Shot_2016-07-14_at_9.25.13_AM.png)
See merge request !5244
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/nav/_project_settings.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/_builds_settings.html.haml | 65 | ||||
-rw-r--r-- | app/views/projects/badges/index.html.haml | 23 | ||||
-rw-r--r-- | app/views/projects/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/pipelines_settings/show.html.haml | 103 |
5 files changed, 106 insertions, 93 deletions
diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 51a54b4f262..52a5bdc1a1b 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -39,7 +39,7 @@ = link_to namespace_project_triggers_path(@project.namespace, @project), title: 'Triggers' do %span Triggers - = nav_link(controller: :badges) do - = link_to namespace_project_badges_path(@project.namespace, @project), title: 'Badges' do + = nav_link(controller: :pipelines_settings) do + = link_to namespace_project_pipelines_settings_path(@project.namespace, @project), title: 'CI/CD Pipelines' do %span - Badges + CI/CD Pipelines diff --git a/app/views/projects/_builds_settings.html.haml b/app/views/projects/_builds_settings.html.haml deleted file mode 100644 index fff30f11d82..00000000000 --- a/app/views/projects/_builds_settings.html.haml +++ /dev/null @@ -1,65 +0,0 @@ -%fieldset.builds-feature - %h5.prepend-top-0 - Builds - - unless @repository.gitlab_ci_yml - .form-group - %p Builds need to be configured before you can begin using Continuous Integration. - = link_to 'Get started with Builds', help_page_path('ci/quick_start/README'), class: 'btn btn-info' - .form-group - %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: 'label-light' - = 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: 'label-light' - .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+\% - %li - gcovr (C/C++) - - %code ^TOTAL.*\s+(\d+\%)$ - %li - tap --coverage-report=text-summary (Node.js) - - %code ^Statements\s*:\s*([^%]+) - - .form-group - .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.append-bottom-0 - = f.label :runners_token, "Runners token", class: 'label-light' - = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' - %p.help-block The secure token used to checkout project. diff --git a/app/views/projects/badges/index.html.haml b/app/views/projects/badges/index.html.haml deleted file mode 100644 index ac80951dd4f..00000000000 --- a/app/views/projects/badges/index.html.haml +++ /dev/null @@ -1,23 +0,0 @@ -- page_title 'Badges' -- badges_path = namespace_project_badges_path(@project.namespace, @project) - -.prepend-top-10 - .panel.panel-default - .panel-heading - %b Builds badge · - = @build_badge.to_html - .pull-right - = render 'shared/ref_switcher', destination: 'badges', align_right: true - .panel-body - .row - .col-md-2.text-center - Markdown - .col-md-10.code.js-syntax-highlight - = highlight('.md', @build_badge.to_markdown) - .row - %hr - .row - .col-md-2.text-center - HTML - .col-md-10.code.js-syntax-highlight - = highlight('.html', @build_badge.to_html) diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 541d81e65e5..921155e970b 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -90,8 +90,6 @@ %hr = render 'merge_request_settings', f: f %hr - = render 'builds_settings', f: f - %hr %fieldset.features.append-bottom-default %h5.prepend-top-0 Project avatar diff --git a/app/views/projects/pipelines_settings/show.html.haml b/app/views/projects/pipelines_settings/show.html.haml new file mode 100644 index 00000000000..228bad36ebd --- /dev/null +++ b/app/views/projects/pipelines_settings/show.html.haml @@ -0,0 +1,103 @@ +- page_title "CI/CD Pipelines" + +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + = page_title + .col-lg-9 + %h5.prepend-top-0 + Pipelines + = form_for @project, url: namespace_project_pipelines_settings_path(@project.namespace.becomes(Namespace), @project), remote: true, authenticity_token: true do |f| + %fieldset.builds-feature + - unless @repository.gitlab_ci_yml + .form-group + %p Pipelines need to be configured before you can begin using Continuous Integration. + = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' + .form-group + %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: 'label-light' + = 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: 'label-light' + .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+\% + %li + gcovr (C/C++) - + %code ^TOTAL.*\s+(\d+\%)$ + %li + tap --coverage-report=text-summary (Node.js) - + %code ^Statements\s*:\s*([^%]+) + + .form-group + .checkbox + = f.label :public_builds do + = f.check_box :public_builds + %strong Public pipelines + .help-block Allow everyone to access pipelines for Public and Internal projects + + .form-group.append-bottom-default + = f.label :runners_token, "Runners token", class: 'label-light' + = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' + %p.help-block The secure token used to checkout project. + + = f.submit 'Save changes', class: "btn btn-save" + +%hr + +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + Builds Badge + .col-lg-9 + .prepend-top-10 + .panel.panel-default + .panel-heading + %b Builds badge · + = @build_badge.to_html + .pull-right + = render 'shared/ref_switcher', destination: 'badges', align_right: true + .panel-body + .row + .col-md-2.text-center + Markdown + .col-md-10.code.js-syntax-highlight + = highlight('.md', @build_badge.to_markdown) + .row + %hr + .row + .col-md-2.text-center + HTML + .col-md-10.code.js-syntax-highlight + = highlight('.html', @build_badge.to_html) |