Add button to CI build artifacts browser into build summary
This commit is contained in:
parent
87df1df3cd
commit
d8cc9e4ef7
|
@ -328,6 +328,13 @@ module Ci
|
|||
end
|
||||
end
|
||||
|
||||
def artifacts_browse_url
|
||||
if artifacts_file.exists?
|
||||
Gitlab::Application.routes.url_helpers.
|
||||
browse_namespace_project_build_artifacts_path(project.namespace, project, self)
|
||||
end
|
||||
end
|
||||
|
||||
def execute_hooks
|
||||
build_data = Gitlab::BuildDataBuilder.build(self)
|
||||
project.execute_hooks(build_data.dup, :build_hooks)
|
||||
|
|
|
@ -91,7 +91,12 @@
|
|||
|
||||
- if current_user && can?(current_user, :download_build_artifacts, @project) && @build.download_url
|
||||
.build-widget.center
|
||||
= link_to "Download artifacts", @build.download_url, class: 'btn btn-sm btn-primary'
|
||||
.panel.panel-default
|
||||
.panel-heading Build artifacts
|
||||
.panel-body
|
||||
.btn-group{ role: :group }
|
||||
= link_to "Download", @build.download_url, class: 'btn btn-sm btn-primary'
|
||||
= link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary'
|
||||
|
||||
.build-widget
|
||||
%h4.title
|
||||
|
|
Loading…
Reference in New Issue