diff options
Diffstat (limited to 'lib/api/pipelines.rb')
-rw-r--r-- | lib/api/pipelines.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index 06f8920b37c..c09bca26a41 100644 --- a/lib/api/pipelines.rb +++ b/lib/api/pipelines.rb @@ -108,6 +108,21 @@ module API present pipeline.variables, with: Entities::Variable end + desc 'Gets the test report for a given pipeline' do + detail 'This feature was introduced in GitLab 13.0. Disabled by default behind feature flag `junit_pipeline_view`' + success TestReportEntity + end + params do + requires :pipeline_id, type: Integer, desc: 'The pipeline ID' + end + get ':id/pipelines/:pipeline_id/test_report' do + not_found! unless Feature.enabled?(:junit_pipeline_view, user_project) + + authorize! :read_build, pipeline + + present pipeline.test_reports, with: TestReportEntity + end + desc 'Deletes a pipeline' do detail 'This feature was introduced in GitLab 11.6' http_codes [[204, 'Pipeline was deleted'], [403, 'Forbidden']] |