Commit d8cc9e4e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add button to CI build artifacts browser into build summary

parent 87df1df3
...@@ -328,6 +328,13 @@ module Ci ...@@ -328,6 +328,13 @@ module Ci
end end
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 def execute_hooks
build_data = Gitlab::BuildDataBuilder.build(self) build_data = Gitlab::BuildDataBuilder.build(self)
project.execute_hooks(build_data.dup, :build_hooks) project.execute_hooks(build_data.dup, :build_hooks)
......
...@@ -91,7 +91,12 @@ ...@@ -91,7 +91,12 @@
- if current_user && can?(current_user, :download_build_artifacts, @project) && @build.download_url - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.download_url
.build-widget.center .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 .build-widget
%h4.title %h4.title
......
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