diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-19 12:49:54 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-19 12:49:54 +0000 |
commit | 61e7453e0465ceb631d3e8445429cfed7c1449d3 (patch) | |
tree | f20fabfca0a5d7cdf694f1df69c88788b3f8eb65 /app/views/projects/deployments/_actions.haml | |
parent | ad14c1bf85f716ed698e8802161de74f462a106c (diff) | |
parent | 72229c375fb3efe9dd28c0bf98f0df7696d99fc2 (diff) | |
download | gitlab-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/deployments/_actions.haml')
-rw-r--r-- | app/views/projects/deployments/_actions.haml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml new file mode 100644 index 00000000000..65d68aa2985 --- /dev/null +++ b/app/views/projects/deployments/_actions.haml @@ -0,0 +1,22 @@ +- if can?(current_user, :create_deployment, deployment) && deployment.deployable + .pull-right + - actions = deployment.manual_actions + - if actions.present? + .btn-group.inline + .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 |action| + %li + = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do + = icon("play") + %span= action.name.humanize + + - if local_assigns.fetch(:allow_rollback, false) + = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do + - if deployment.last? + Retry + - else + Rollback |