From f5dd0957bee6f8881f2c53bf2cd5db4c9a109326 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Mon, 24 Oct 2016 15:20:27 -0500 Subject: add link to build's pipeline within build page header --- app/helpers/gitlab_routing_helper.rb | 4 ++++ app/views/projects/builds/_header.html.haml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb index bccf64d1aac..af9087d8326 100644 --- a/app/helpers/gitlab_routing_helper.rb +++ b/app/helpers/gitlab_routing_helper.rb @@ -82,6 +82,10 @@ module GitlabRoutingHelper namespace_project_merge_request_path(entity.project.namespace, entity.project, entity, *args) end + def pipeline_path(pipeline, *args) + namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id, *args) + end + def milestone_path(entity, *args) namespace_project_milestone_path(entity.project.namespace, entity.project, entity, *args) end diff --git a/app/views/projects/builds/_header.html.haml b/app/views/projects/builds/_header.html.haml index 3f2ce7377fd..9f69bd64f71 100644 --- a/app/views/projects/builds/_header.html.haml +++ b/app/views/projects/builds/_header.html.haml @@ -3,6 +3,9 @@ = ci_status_with_icon(@build.status) Build %strong ##{@build.id} + in pipeline + = link_to pipeline_path(@build.pipeline) do + %strong ##{@build.pipeline.id} for commit = link_to ci_status_path(@build.pipeline) do %strong= @build.pipeline.short_sha -- cgit v1.2.1