summaryrefslogtreecommitdiff
path: root/app/views/projects/settings/ci_cd/_form.html.haml
blob: bfb275b9ef527e3e8056961f1b0ee283412ca778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.row.prepend-top-default
  .col-lg-12
    = form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings') do |f|
      = form_errors(@project)
      %fieldset.builds-feature
        .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").html_safe
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank'
          .form-check
            = f.radio_button :build_allow_git_fetch, 'false', { class: 'form-check-input' }
            = f.label :build_allow_git_fetch_false, class: 'form-check-label' do
              %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")
          .form-check
            = f.radio_button :build_allow_git_fetch, 'true', { class: 'form-check-input' }
            = f.label :build_allow_git_fetch_true, class: 'form-check-label' do
              %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-bold'
          = f.text_field :build_timeout_human_readable, class: 'form-control'
          %p.form-text.text-muted
            = _('If any job surpasses this timeout threshold, it will be marked as failed. Human readable time input language is accepted like "1 hour". Values without specification represent seconds.')
            = 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-bold'
          = f.text_field :ci_config_path, class: 'form-control', placeholder: '.gitlab-ci.yml'
          %p.form-text.text-muted
            = _("The path to CI config file. Defaults to <code>.gitlab-ci.yml</code>").html_safe
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'custom-ci-config-path'), target: '_blank'

        %hr
        .form-group
          .form-check
            = f.check_box :public_builds, { class: 'form-check-input' }
            = f.label :public_builds, class: 'form-check-label' do
              %strong= _("Public pipelines")
            .form-text.text-muted
              = _("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
          .form-check
            = f.check_box :auto_cancel_pending_pipelines, { class: 'form-check-input' }, 'enabled', 'disabled'
            = f.label :auto_cancel_pending_pipelines, class: 'form-check-label' do
              %strong= _("Auto-cancel redundant, pending pipelines")
            .form-text.text-muted
              = _("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-bold'
          .input-group
            %span.input-group-prepend
              .input-group-text /
            = f.text_field :build_coverage_regex, class: 'form-control', placeholder: 'Regular expression'
            %span.input-group-append
              .input-group-text /
          %p.form-text.text-muted
            = _("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 ^TOTAL\s+\d+\s+\d+\s+(\d+\%)$
              %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+)%
              %li
                JaCoCo (Java/Kotlin)
                %code Total.*?([0-9]{1,3})%
              %li
                go test -cover (Go)
                %code coverage: \d+.\d+% of statements
              %li
                nyc npm test (NodeJS) -
                %code All files[^|]*\|[^|]*\s+([\d\.]+)

        = f.submit _('Save changes'), class: "btn btn-success"

%hr

.row.prepend-top-default
  = render partial: 'badge', collection: @badges