diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-03-22 15:31:41 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-04-04 19:47:37 +0200 |
commit | 909c277e56e2773bab8368b6fdd3871a4c9c53f3 (patch) | |
tree | 9c0bd69a84396974b98d7aebb6b6ac47623b12bb /app/views/projects/settings/ci_cd/_form.html.haml | |
parent | 99caa5bb04dea578f767e89296301b00d7401c5d (diff) | |
download | gitlab-ce-909c277e56e2773bab8368b6fdd3871a4c9c53f3.tar.gz |
Move leftovers from pipelines_settings_controller to settings/ci_cd_controller
Diffstat (limited to 'app/views/projects/settings/ci_cd/_form.html.haml')
-rw-r--r-- | app/views/projects/settings/ci_cd/_form.html.haml | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml new file mode 100644 index 00000000000..a976ad12cff --- /dev/null +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -0,0 +1,161 @@ +.row.prepend-top-default + .col-lg-12 + = form_for @project, url: project_settings_ci_cd_path(@project) do |f| + = form_errors(@project) + %fieldset.builds-feature + .form-group + %h5 Auto DevOps (Beta) + %p + Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration. + = 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 + = form.label :enabled_true do + = 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. + + .radio + = form.label :enabled_false do + = 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 + = form.label :enabled_ do + = form.radio_button :enabled, '' + %strong Instance default (#{Gitlab::CurrentSettings.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>. + %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' + + %hr + .form-group.append-bottom-default.js-secret-runner-token + = f.label :runners_token, "Runner token", class: 'label-light' + .form-control.js-secret-value-placeholder + = '*' * 20 + = f.text_field :runners_token, class: "form-control hide js-secret-value", placeholder: 'xEeFCaDAB89' + %p.help-block The secure token used by the Runner to checkout the project + %button.btn.btn-info.prepend-top-10.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: 'false' } } + = _('Reveal value') + + %hr + .form-group + %h5.prepend-top-0 + Git strategy for pipelines + %p + Choose between <code>clone</code> or <code>fetch</code> to get the recent application code + = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank' + .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 the project workspace is pristine as it clones the repository from scratch for every job + .radio + = f.label :build_allow_git_fetch_true do + = f.radio_button :build_allow_git_fetch, 'true' + %strong git fetch + %br + %span.descr + Faster as it re-uses the project workspace (falling back to clone if it doesn't exist) + + %hr + .form-group + = f.label :build_timeout_human_readable, 'Timeout', class: 'label-light' + = f.text_field :build_timeout_human_readable, class: 'form-control' + %p.help-block + Per job. If a job passes this threshold, it will be marked as failed + = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'timeout'), target: '_blank' + + %hr + .form-group + = f.label :ci_config_path, 'Custom CI config path', class: 'label-light' + = f.text_field :ci_config_path, class: 'form-control', placeholder: '.gitlab-ci.yml' + %p.help-block + The path to CI config file. Defaults to <code>.gitlab-ci.yml</code> + = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'custom-ci-config-path'), target: '_blank' + + %hr + .form-group + .checkbox + = f.label :public_builds do + = f.check_box :public_builds + %strong Public pipelines + .help-block + Allow public access to pipelines and job details, including output logs and artifacts + = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'visibility-of-pipelines'), target: '_blank' + .bs-callout.bs-callout-info + %p If enabled: + %ul + %li + For public projects, anyone can view pipelines and access job details (output logs and artifacts) + %li + For internal projects, any logged in user can view pipelines and access job details (output logs and artifacts) + %li + For private projects, any member (guest or higher) can view pipelines and access job details (output logs and artifacts) + %p + If disabled, the access level will depend on the user's + permissions in the project. + + %hr + .form-group + .checkbox + = f.label :auto_cancel_pending_pipelines do + = f.check_box :auto_cancel_pending_pipelines, {}, 'enabled', 'disabled' + %strong Auto-cancel redundant, pending pipelines + .help-block + New pipelines will cancel older, pending pipelines on the same branch + = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'auto-cancel-pending-pipelines'), target: '_blank' + + %hr + .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: 'Regular expression' + %span.input-group-addon / + %p.help-block + A regular expression that will be used to find the test coverage + output in the job trace. Leave blank to disable + = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'test-coverage-parsing'), target: '_blank' + .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 (NodeJS) - + %code ^Statements\s*:\s*([^%]+) + %li + excoveralls (Elixir) - + %code \[TOTAL\]\s+(\d+\.\d+)% + + = f.submit 'Save changes', class: "btn btn-save" + +%hr + +.row.prepend-top-default + = render partial: 'badge', collection: @badges |