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
|
= nested_form_for @project, html: { class: 'form-horizontal' } do |f|
- if @project.errors.any?
#error_explanation
%p.lead= "#{pluralize(@project.errors.count, "error")} prohibited this project from being saved:"
.alert.alert-error
%ul
- @project.errors.full_messages.each do |msg|
%li= msg
= f.fields_for :jobs do |job_form|
- if job_form.object.job_type == "deploy" || job_form.object.new_record?
= job_form.hidden_field :job_type, value: "deploy"
.form-group
= f.label :name, 'Name', class: 'control-label'
.col-sm-10
= job_form.text_field :name, class: 'form-control', placeholder: "Staging"
.form-group
= label_tag :tag_list, class: 'control-label' do
Tags
.col-sm-10
= job_form.text_field :tag_list, class: 'form-control'
.help-block
This job will only use runners that contain all these tags.
Leave blank if you want this job to use any runner
.form-group
= label_tag :refs, class: 'control-label' do
Refs
.col-sm-10
= job_form.text_field :refs, class: 'form-control', placeholder: "master, staging, feature/*, tags/testing*"
.help-block
Run only when the above git refs strings match the branch or tag that was pushed.
%br
Accepts strings and glob pattern syntax
.form-group
= f.label :commands, 'Script', class: 'control-label'
.col-sm-10
= job_form.text_area :commands, class: 'form-control', rows: 10, placeholder: "bundle exec rake spec"
%p.light
All lines will be concatenated into one file and executed.
%br
If you change the working directory or the environment this will affect all following lines.
%br
= link_to("Example job scripts", "https://gitlab.com/gitlab-org/gitlab-ci/tree/master/doc/examples")
= job_form.link_to_remove "Remove this job", class: 'btn btn-danger pull-right'
%hr
.clearfix
= f.link_to_add "Add a job", :jobs, class: 'btn btn-save pull-right'
.form-actions
= f.submit 'Save changes', class: 'btn btn-success'
|