summaryrefslogtreecommitdiff
path: root/app/views/projects/builds/show.html.haml
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-11-04 16:35:22 +0100
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-11-08 16:50:03 -0600
commitc70acb57f5adcd4f0a19f8e7d5bcb356464a9c64 (patch)
tree42d3d2c4d8cfabb29c3144ff2a17591dc5f16d2b /app/views/projects/builds/show.html.haml
parent73467bd1634898632d1c9c4e5879546ec9f53032 (diff)
downloadgitlab-ce-c70acb57f5adcd4f0a19f8e7d5bcb356464a9c64.tar.gz
Expose `last_deployment` on `Ci::Builds` [ci skip]
Diffstat (limited to 'app/views/projects/builds/show.html.haml')
-rw-r--r--app/views/projects/builds/show.html.haml34
1 files changed, 18 insertions, 16 deletions
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml
index 6741be25ace..18a336c3fa3 100644
--- a/app/views/projects/builds/show.html.haml
+++ b/app/views/projects/builds/show.html.haml
@@ -26,28 +26,30 @@
= link_to namespace_project_runners_path(@build.project.namespace, @build.project) do
Runners page
- - if @build.deploy
+ - if @build.deployable?
.prepend-top-default
.environment-information
= ci_icon_for_status(@build.status)
- - if @build.last_deployment
- This build is the most recent deployment to
- = link_to @build.environment, namespace_project_environment_path(@project.namespace, @project, @build.environment)
- - else
- - case @build.status
- - when 'failed', 'canceled'
+ - last_deployment = @build.last_deployment
+ - if @build.complete?
+ - if @build.success?
+ - if last_deployment.try(:last?)
+ This build is the most recent deployment to
+ = environment_link_for_build(@build.project, @build)
+ - else
+ This build is an out-of-date deployment to
+ = environment_link_for_build(@build.project, @build)
+ View the most recent deployment
+ = deployment_link(@project, last_deployment)
+ - else
The deployment of this build to
- = link_to @build.environment, namespace_project_environment_path(@project.namespace, @project, @build.environment)
+ = environment_link_for_build(@build.project, @build)
did not complete
- - when 'pending', 'running'
- This build is creating a deployment to
- = link_to @build.environment, namespace_project_environment_path(@project.namespace, @project, @build.environment)
- and will overwrite the latest deployment
- - when 'success'
- This build is an out-of-date deployment to
- = link_to @build.environment, namespace_project_environment_path(@project.namespace, @project, @build.environment)
- View the most recent deployment #24869
+ - else
+ This build is creating a deployment to
+ = environment_link_for_build(@build.project, @build)
+ and will overwrite the latest deployment
.prepend-top-default
- if @build.erased?