diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/job_artifacts.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/api/job_artifacts.rb b/lib/api/job_artifacts.rb index b35aa952f81..63a5bd40478 100644 --- a/lib/api/job_artifacts.rb +++ b/lib/api/job_artifacts.rb @@ -70,6 +70,21 @@ module API present_carrierwave_file!(build.artifacts_file) end + desc 'Download the artifact metrics from a job' do + detail 'This feature was introduced in GitLab 8.5' + end + params do + requires :job_id, type: Integer, desc: 'The ID of a job' + end + route_setting :authentication, job_token_allowed: true + get ':id/jobs/:job_id/metrics' do + authorize_download_artifacts! + + build = find_build!(params[:job_id]) + + present_carrierwave_file!(build.metrics_file) + end + desc 'Download a specific file from artifacts archive' do detail 'This feature was introduced in GitLab 10.0' end |