debian-mirror-gitlab/app/views/projects/pipelines/new.html.haml

48 lines
2.7 KiB
Text
Raw Normal View History

2019-07-07 11:18:12 +05:30
- breadcrumb_title _('Pipelines')
- page_title s_('Pipeline|Run Pipeline')
2018-10-15 14:42:47 +05:30
- settings_link = link_to _('CI/CD settings'), project_settings_ci_cd_path(@project)
2016-06-02 11:05:42 +05:30
%h3.page-title
2019-07-07 11:18:12 +05:30
= s_('Pipeline|Run Pipeline')
2016-06-02 11:05:42 +05:30
%hr
2020-10-24 23:57:45 +05:30
- if Feature.enabled?(:new_pipeline_form)
#js-new-pipeline{ data: { project_id: @project.id, pipelines_path: project_pipelines_path(@project), ref_param: params[:ref] || @project.default_branch, var_param: params[:var].to_json, file_param: params[:file_var].to_json, ref_names: @project.repository.ref_names.to_json.html_safe, settings_link: project_settings_ci_cd_path(@project) } }
2018-10-15 14:42:47 +05:30
2020-10-24 23:57:45 +05:30
- else
= form_for @pipeline, as: :pipeline, url: project_pipelines_path(@project), html: { id: "new-pipeline-form", class: "js-new-pipeline-form js-requires-input" } do |f|
= form_errors(@pipeline)
= pipeline_warnings(@pipeline)
.form-group.row
.col-sm-12
= f.label :ref, s_('Pipeline|Run for'), class: 'col-form-label'
= hidden_field_tag 'pipeline[ref]', params[:ref] || @project.default_branch
= dropdown_tag(params[:ref] || @project.default_branch,
options: { toggle_class: 'js-branch-select wide monospace',
filter: true, dropdown_class: "dropdown-menu-selectable git-revision-dropdown", placeholder: s_("Pipeline|Search branches"),
data: { selected: params[:ref] || @project.default_branch, field_name: 'pipeline[ref]' } })
.form-text.text-muted
= s_("Pipeline|Existing branch name or tag")
2018-10-15 14:42:47 +05:30
2020-10-24 23:57:45 +05:30
.col-sm-12.gl-mt-3.js-ci-variable-list-section
%label
= s_('Pipeline|Variables')
%ul.ci-variable-list
- if params[:var]
- params[:var].each do |variable|
= render 'ci/variables/url_query_variable_row', form_field: 'pipeline', variable: variable
- if params[:file_var]
- params[:file_var].each do |variable|
- variable.push("file")
= render 'ci/variables/url_query_variable_row', form_field: 'pipeline', variable: variable
= render 'ci/variables/variable_row', form_field: 'pipeline', only_key_value: true
.form-text.text-muted
= (s_("Pipeline|Specify variable values to be used in this run. The values specified in %{settings_link} will be used by default.") % {settings_link: settings_link}).html_safe
2016-06-02 11:05:42 +05:30
2020-10-24 23:57:45 +05:30
.form-actions
= f.submit s_('Pipeline|Run Pipeline'), class: 'btn btn-success js-variables-save-button', tabindex: 3
= link_to _('Cancel'), project_pipelines_path(@project), class: 'btn btn-default float-right'
-# haml-lint:disable InlineJavaScript
%script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe