_show.html.haml 5.15 KB
Newer Older
1
.row.prepend-top-default
2
  .col-lg-4.profile-settings-sidebar
3
    %h4.prepend-top-0
4
      Pipelines
5
  .col-lg-8
6
    = form_for @project, url: namespace_project_pipelines_settings_path(@project.namespace.becomes(Namespace), @project) do |f|
7 8 9
      %fieldset.builds-feature
        - unless @repository.gitlab_ci_yml
          .form-group
10
            %p Pipelines need to be configured before you can begin using Continuous Integration.
11
            = link_to 'Get started with Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info'
12 13 14 15 16 17 18
            %hr
        .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
19
        .form-group
20 21 22 23
          %h5.prepend-top-0
            Git strategy for pipelines
          %p
            Choose between <code>clone</code> or <code>fetch</code> to get the recent application code
24
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank'
25 26 27 28 29
          .radio
            = f.label :build_allow_git_fetch_false do
              = f.radio_button :build_allow_git_fetch, 'false'
              %strong git clone
              %br
30 31
              %span.descr
                Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job
32 33 34 35 36
          .radio
            = f.label :build_allow_git_fetch_true do
              = f.radio_button :build_allow_git_fetch, 'true'
              %strong git fetch
              %br
37 38
              %span.descr
                Faster as it re-uses the project workspace (falling back to clone if it doesn't exist)
39

40
        %hr
41 42 43
        .form-group
          = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light'
          = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0'
44
          %p.help-block
45
            Per job in minutes. If a job passes this threshold, it will be marked as failed
46
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'timeout'), target: '_blank'
47

Lin Jen-Shin's avatar
Lin Jen-Shin committed
48 49
        %hr
        .form-group
50
          = f.label :ci_config_file, 'Custom CI config file', class: 'label-light'
Lin Jen-Shin's avatar
Lin Jen-Shin committed
51 52
          = f.text_field :ci_config_file, class: 'form-control', placeholder: '.gitlab-ci.yml'
          %p.help-block
53 54
            The path to CI config file. Default to <code>.gitlab-ci.yml</code>
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'custom-ci-config-file'), target: '_blank'
Lin Jen-Shin's avatar
Lin Jen-Shin committed
55

56 57 58 59 60 61 62 63
        %hr
        .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
64 65 66 67 68 69 70 71 72 73
              = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'visibility-of-pipelines'), target: '_blank'
        %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'
74 75

        %hr
76 77 78 79
        .form-group
          = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light'
          .input-group
            %span.input-group-addon /
80
            = f.text_field :build_coverage_regex, class: 'form-control', placeholder: 'Regular expression'
81 82
            %span.input-group-addon /
          %p.help-block
83
            A regular expression that will be used to find the test coverage
Filipa Lacerda's avatar
Filipa Lacerda committed
84
            output in the job trace. Leave blank to disable
85
            = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'test-coverage-parsing'), target: '_blank'
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
          .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
102
                tap --coverage-report=text-summary (NodeJS) -
103
                %code ^Statements\s*:\s*([^%]+)
PotHix's avatar
PotHix committed
104 105 106
              %li
                excoveralls (Elixir) -
                %code \[TOTAL\]\s+(\d+\.\d+)%
107

108
        = f.submit 'Save changes', class: "btn btn-save"
109

110
%hr
111

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