Add view action to artifacts controller

This commit is contained in:
Grzegorz Bizon 2015-12-17 15:17:00 +01:00
parent 79fe18d9e7
commit a96d45c694
4 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -336,8 +336,6 @@ module Ci
project.execute_services(build_data.dup, :build_hooks)
end
private
def yaml_variables

View 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

View file

@ -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