Add view action to artifacts controller
This commit is contained in:
parent
79fe18d9e7
commit
a96d45c694
4 changed files with 10 additions and 3 deletions
|
@ -14,6 +14,10 @@ class Projects::Builds::ArtifactsController < Projects::ApplicationController
|
|||
send_file artifacts_file.path, disposition: 'attachment'
|
||||
end
|
||||
|
||||
def view
|
||||
@metadata = build.artifacts_metadata
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def build
|
||||
|
|
|
@ -336,8 +336,6 @@ module Ci
|
|||
project.execute_services(build_data.dup, :build_hooks)
|
||||
end
|
||||
|
||||
|
||||
|
||||
private
|
||||
|
||||
def yaml_variables
|
||||
|
|
4
app/views/projects/builds/artifacts/view.html.haml
Normal file
4
app/views/projects/builds/artifacts/view.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- page_title "#{@build.name} (##{@build.id})", 'Build artifacts'
|
||||
- header_title project_title(@project, "Build artifacts", namespace_project_build_path(@project.namespace, @project, @build))
|
||||
|
||||
= @metadata.inspect
|
|
@ -609,9 +609,10 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
scope module: :builds do
|
||||
resources :artifacts do
|
||||
resource :artifacts, only: [] do
|
||||
collection do
|
||||
get :download
|
||||
get 'view(/:path)', as: :view, to: 'artifacts#view'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue