summaryrefslogtreecommitdiff
path: root/app/views/projects/ci/pipelines/_pipeline.html.haml
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-19 12:49:54 +0000
committerRémy Coutable <remy@rymai.me>2016-07-19 12:49:54 +0000
commit61e7453e0465ceb631d3e8445429cfed7c1449d3 (patch)
treef20fabfca0a5d7cdf694f1df69c88788b3f8eb65 /app/views/projects/ci/pipelines/_pipeline.html.haml
parentad14c1bf85f716ed698e8802161de74f462a106c (diff)
parent72229c375fb3efe9dd28c0bf98f0df7696d99fc2 (diff)
downloadgitlab-ce-61e7453e0465ceb631d3e8445429cfed7c1449d3.tar.gz
Merge branch 'manual-actions' into 'master'
Add support for manual CI actions ## What does this MR do? This implements a `when: manual` which allows a jobs to be marked as manual actions. Manual actions have to be explicitly executed by developers. ## What are the relevant issue numbers? This is to solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/17010 See merge request !5297
Diffstat (limited to 'app/views/projects/ci/pipelines/_pipeline.html.haml')
-rw-r--r--app/views/projects/ci/pipelines/_pipeline.html.haml37
1 files changed, 25 insertions, 12 deletions
diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml
index 7ae699832f6..996c9073770 100644
--- a/app/views/projects/ci/pipelines/_pipeline.html.haml
+++ b/app/views/projects/ci/pipelines/_pipeline.html.haml
@@ -58,18 +58,31 @@
%td.pipeline-actions
.controls.hidden-xs.pull-right
- artifacts = pipeline.builds.latest.select { |b| b.artifacts? }
- - if artifacts.present?
- .inline
- .btn-group
- %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
- = icon("download")
- %b.caret
- %ul.dropdown-menu.dropdown-menu-align-right
- - artifacts.each do |build|
- %li
- = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, build), rel: 'nofollow' do
- = icon("download")
- %span Download '#{build.name}' artifacts
+ - actions = pipeline.manual_actions
+ - if artifacts.present? || actions.any?
+ .btn-group.inline
+ - if actions.any?
+ .btn-group
+ %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
+ = icon("play")
+ %b.caret
+ %ul.dropdown-menu.dropdown-menu-align-right
+ - actions.each do |build|
+ %li
+ = link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do
+ = icon("play")
+ %span= build.name.humanize
+ - if artifacts.present?
+ .btn-group
+ %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
+ = icon("download")
+ %b.caret
+ %ul.dropdown-menu.dropdown-menu-align-right
+ - artifacts.each do |build|
+ %li
+ = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, build), rel: 'nofollow' do
+ = icon("download")
+ %span Download '#{build.name}' artifacts
- if can?(current_user, :update_pipeline, @project)
.cancel-retry-btns.inline