_show.html.haml 7.3 KB
Newer Older
1
.row.prepend-top-default
2
  .col-lg-12
3
    = form_for @project, url: project_pipelines_settings_path(@project) do |f|
4
      %fieldset.builds-feature
5
        .form-group
6
          %h5 Auto DevOps (Beta)
7
          %p
8
            Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration.
9
            = link_to 'Learn more about Auto DevOps', help_page_path('topics/autodevops/index.md')
10 11 12 13
            - message = auto_devops_warning_message(@project)
            - if message
              %p.settings-message.text-center
                = message.html_safe
14 15
          = f.fields_for :auto_devops_attributes, @auto_devops do |form|
            .radio
16 17 18 19 20
              = form.label :enabled_true do
                = form.radio_button :enabled, 'true'
                %strong Enable Auto DevOps
                %br
                %span.descr
21
                  The Auto DevOps pipeline configuration will be used when there is no <code>.gitlab-ci.yml</code> in the project.
22
            .radio
23 24 25 26 27
              = form.label :enabled_false do
                = form.radio_button :enabled, 'false'
                %strong Disable Auto DevOps
                %br
                %span.descr
28
                  An explicit <code>.gitlab-ci.yml</code> needs to be specified before you can begin using Continious Integration and Delivery.
29
            .radio
30 31
              = form.label :enabled_nil do
                = form.radio_button :enabled, ''
32
                %strong Instance default (#{current_application_settings.auto_devops_enabled? ? 'enabled' : 'disabled'})
33 34
                %br
                %span.descr
35
                  Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific <code>.gitlab-ci.yml</code>.
36
                %br
37
            %p
38
              You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages.
39 40 41
            = form.text_field :domain, class: 'form-control', placeholder: 'domain.com'

        %hr
42 43 44 45 46 47
        .form-group.append-bottom-default
          = f.label :runners_token, "Runner token", class: 'label-light'
          = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89'
          %p.help-block The secure token used by the Runner to checkout the project

        %hr
48
        .form-group
49 50 51 52
          %h5.prepend-top-0
            Git strategy for pipelines
          %p
            Choose between <code>clone</code> or <code>fetch</code> to get the recent application code
53
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank'
54 55 56 57 58
          .radio
            = f.label :build_allow_git_fetch_false do
              = f.radio_button :build_allow_git_fetch, 'false'
              %strong git clone
              %br
59 60
              %span.descr
                Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job
61 62 63 64 65
          .radio
            = f.label :build_allow_git_fetch_true do
              = f.radio_button :build_allow_git_fetch, 'true'
              %strong git fetch
              %br
66 67
              %span.descr
                Faster as it re-uses the project workspace (falling back to clone if it doesn't exist)
68

69
        %hr
70 71 72
        .form-group
          = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light'
          = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0'
73
          %p.help-block
74
            Per job in minutes. If a job passes this threshold, it will be marked as failed
75
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'timeout'), target: '_blank'
76

Lin Jen-Shin's avatar
Lin Jen-Shin committed
77 78
        %hr
        .form-group
79 80
          = 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'
Lin Jen-Shin's avatar
Lin Jen-Shin committed
81
          %p.help-block
82
            The path to CI config file. Defaults to <code>.gitlab-ci.yml</code>
83
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'custom-ci-config-path'), target: '_blank'
Lin Jen-Shin's avatar
Lin Jen-Shin committed
84

85 86 87 88 89 90 91
        %hr
        .form-group
          .checkbox
            = f.label :public_builds do
              = f.check_box :public_builds
              %strong Public pipelines
            .help-block
92
              Allow public access to pipelines and job details, including output logs and artifacts
93
              = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'visibility-of-pipelines'), target: '_blank'
94 95 96 97 98 99 100 101 102 103 104 105 106
            .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.

107 108 109 110 111 112 113 114 115
        %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'
116 117

        %hr
118 119 120 121
        .form-group
          = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light'
          .input-group
            %span.input-group-addon /
122
            = f.text_field :build_coverage_regex, class: 'form-control', placeholder: 'Regular expression'
123 124
            %span.input-group-addon /
          %p.help-block
125
            A regular expression that will be used to find the test coverage
Filipa Lacerda's avatar
Filipa Lacerda committed
126
            output in the job trace. Leave blank to disable
127
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'test-coverage-parsing'), target: '_blank'
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
          .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
144
                tap --coverage-report=text-summary (NodeJS) -
145
                %code ^Statements\s*:\s*([^%]+)
PotHix's avatar
PotHix committed
146 147 148
              %li
                excoveralls (Elixir) -
                %code \[TOTAL\]\s+(\d+\.\d+)%
149

150
        = f.submit 'Save changes', class: "btn btn-save"
151

152
%hr
153

154
.row.prepend-top-default
155
  = render partial: 'projects/pipelines_settings/badge', collection: @badges