Commit 62d991c8 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Show latest pipeline status if what provided artifacts aren't latest

parent d84aa560
...@@ -40,7 +40,10 @@ ...@@ -40,7 +40,10 @@
%ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' } %ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
%li.dropdown-header Artifacts %li.dropdown-header Artifacts
- unless pipeline.latest? - unless pipeline.latest?
= " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(@project.namespace, @project, pipeline))})" - latest_pipeline = @project.pipeline_for(branch.name)
%li
%span= latest_pipeline.status.humanize
%li.dropdown-header Previous Artifacts
- artifacts.each do |job| - artifacts.each do |job|
%li %li
= link_to search_namespace_project_artifacts_path(@project.namespace, @project, branch.name, 'download', job: job.name), rel: 'nofollow' do = link_to search_namespace_project_artifacts_path(@project.namespace, @project, branch.name, 'download', job: job.name), rel: 'nofollow' do
......
...@@ -20,7 +20,10 @@ ...@@ -20,7 +20,10 @@
- if artifacts.any? - if artifacts.any?
%li.dropdown-header Artifacts %li.dropdown-header Artifacts
- unless pipeline.latest? - unless pipeline.latest?
= " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(@project.namespace, @project, pipeline))})" - latest_pipeline = @project.pipeline_for(@ref)
%li
%span= latest_pipeline.status.humanize
%li.dropdown-header Previous Artifacts
- artifacts.each do |job| - artifacts.each do |job|
%li %li
= link_to search_namespace_project_artifacts_path(@project.namespace, @project, @ref, 'download', job: job.name), rel: 'nofollow' do = link_to search_namespace_project_artifacts_path(@project.namespace, @project, @ref, 'download', job: job.name), rel: 'nofollow' do
......
...@@ -31,7 +31,10 @@ ...@@ -31,7 +31,10 @@
- if artifacts.any? - if artifacts.any?
%li.dropdown-header Artifacts %li.dropdown-header Artifacts
- unless pipeline.latest? - unless pipeline.latest?
= " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(@project.namespace, @project, pipeline))})" - latest_pipeline = @project.pipeline_for(ref)
%li
%span= latest_pipeline.status.humanize
%li.dropdown-header Previous Artifacts
- artifacts.each do |job| - artifacts.each do |job|
%li %li
= link_to search_namespace_project_artifacts_path(@project.namespace, @project, ref, 'download', job: job.name), rel: 'nofollow' do = link_to search_namespace_project_artifacts_path(@project.namespace, @project, ref, 'download', job: job.name), rel: 'nofollow' do
......
...@@ -18,7 +18,10 @@ ...@@ -18,7 +18,10 @@
- if artifacts.any? - if artifacts.any?
%li.dropdown-header Artifacts %li.dropdown-header Artifacts
- unless pipeline.latest? - unless pipeline.latest?
= " (not latest, but #{link_to(pipeline.short_sha, namespace_project_pipeline_path(project.namespace, project, pipeline))})" - latest_pipeline = @project.pipeline_for(ref)
%li
%span= latest_pipeline.status.humanize
%li.dropdown-header Previous Artifacts
- artifacts.each do |job| - artifacts.each do |job|
%li %li
= link_to search_namespace_project_artifacts_path(project.namespace, project, ref, 'download', job: job.name), rel: 'nofollow' do = link_to search_namespace_project_artifacts_path(project.namespace, project, ref, 'download', job: job.name), rel: 'nofollow' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment