diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml index 5b2ddce3e91aeed0836611cebdb2cee555bc9920..396fb8598ae554e5c04857468514ac20cc6df2e5 100644 --- a/app/views/projects/repositories/_download_archive.html.haml +++ b/app/views/projects/repositories/_download_archive.html.haml @@ -25,10 +25,14 @@ = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar'), rel: 'nofollow' do %i.fa.fa-download %span Download tar - - artifacts = @project.latest_success_builds_for(@ref) - - if artifacts.any? - %li.dropdown-header Artifacts - - artifacts.each do |job| - %li - = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, job), rel: 'nofollow' do - %span Download '#{job.name}' + - pipeline = @project.latest_success_pipeline_for(ref).first + - if pipeline + - artifacts = pipeline.builds.latest_success_with_artifacts + - if artifacts.any? + %li.dropdown-header Artifacts + - unless pipeline.latest? + = " (not latest, but #{link_to(pipeline.short_sha, namespace_project_tree_path(@project.namespace, @project, pipeline.sha))})" + - artifacts.each do |job| + %li + = link_to search_namespace_project_artifacts_path(@project.namespace, @project, ref, 'download', job: job.name), rel: 'nofollow' do + %span Download '#{job.name}'