Commit a96d45c6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add view action to artifacts controller

parent 79fe18d9
......@@ -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
......
- 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
......
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