gitlab-org--gitlab-foss/app/views/projects/ci_settings/_form.html.haml

120 lines
4.4 KiB
Plaintext
Raw Normal View History

%h3.page-title
CI settings
%hr
2015-08-26 01:42:46 +00:00
.bs-callout.help-callout
%p
If you want to test your .gitlab-ci.yml, you can use special tool - #{link_to "Lint", ci_lint_path}
%p
Edit your
#{link_to ".gitlab-ci.yml using web-editor", yaml_web_editor_link(@ci_project)}
2015-08-26 01:42:46 +00:00
- if @repository
%p
Paste build status image for #{@repository.root_ref} with next link
= link_to '#', class: 'badge-codes-toggle btn btn-default btn-xs' do
Status Badge
.badge-codes-block.bs-callout.bs-callout-info.hide
%p
Status badge for
%span.label.label-info #{@ref}
branch
%div
%label Markdown:
= text_field_tag 'badge_md', markdown_badge_code(@ci_project, @repository.root_ref), readonly: true, class: 'form-control'
%label Html:
= text_field_tag 'badge_html', html_badge_code(@ci_project, @repository.root_ref), readonly: true, class: 'form-control'
= nested_form_for @ci_project, url: namespace_project_ci_settings_path(@project.namespace, @project), html: { class: 'form-horizontal' } do |f|
- if @ci_project.errors.any?
2015-08-26 01:42:46 +00:00
#error_explanation
%p.lead= "#{pluralize(@ci_project.errors.count, "error")} prohibited this project from being saved:"
2015-08-26 01:42:46 +00:00
.alert.alert-error
%ul
- @ci_project.errors.full_messages.each do |msg|
2015-08-26 01:42:46 +00:00
%li= msg
%fieldset
%legend Build settings
.form-group
= label_tag nil, class: 'control-label' do
Get code
.col-sm-10
%p Get recent application code using the following command:
.radio
= label_tag do
= f.radio_button :allow_git_fetch, 'false'
%strong git clone
.light Slower but makes sure you have a clean dir before every build
.radio
= label_tag do
= f.radio_button :allow_git_fetch, 'true'
%strong git fetch
.light Faster
.form-group
= f.label :timeout_in_minutes, 'Timeout', class: 'control-label'
.col-sm-10
= f.number_field :timeout_in_minutes, class: 'form-control', min: '0'
.light per build in minutes
%fieldset
%legend Build Schedule
.form-group
= f.label :always_build, 'Schedule build', class: 'control-label'
.col-sm-10
.checkbox
= f.label :always_build do
= f.check_box :always_build
%span.light Repeat last build after X hours if no builds
.form-group
= f.label :polling_interval, "Build interval", class: 'control-label'
.col-sm-10
= f.number_field :polling_interval, placeholder: '5', min: '0', class: 'form-control'
.light In hours
%fieldset
%legend Project settings
.form-group
= f.label :default_ref, "Make tabs for the following branches", class: 'control-label'
.col-sm-10
= f.text_field :default_ref, class: 'form-control', placeholder: 'master, stable'
.light You will be able to filter builds by the following branches
.form-group
= f.label :public, 'Public mode', class: 'control-label'
.col-sm-10
.checkbox
= f.label :public do
= f.check_box :public
%span.light Anyone can see project and builds
.form-group
= f.label :coverage_regex, "Test coverage parsing", class: 'control-label'
.col-sm-10
.input-group
%span.input-group-addon /
= f.text_field :coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered'
%span.input-group-addon /
.light 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+\%$
%fieldset
%legend Advanced settings
.form-group
= f.label :token, "CI token", class: 'control-label'
.col-sm-10
= f.text_field :token, class: 'form-control', placeholder: 'xEeFCaDAB89'
2015-08-26 01:42:46 +00:00
.form-actions
= f.submit 'Save changes', class: 'btn btn-save'
- unless @ci_project.new_record?
= link_to 'Remove Project', ci_project_path(@ci_project), method: :delete, data: { confirm: 'Project will be removed. Are you sure?' }, class: 'btn btn-danger pull-right'