Commit e20a974d authored by Albert Salim's avatar Albert Salim

Set low urgency SLI for Verify:Testing endpoints

- GET /api/projects/:id/pipelines/:pipeline_id/test_report
- POST /api/jobs/:id/artifacts
- POST /api/jobs/:id/artifacts/authorize
- GET /api/jobs/:id/artifacts
- GET /api/projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path
parent e5c42b6c
...@@ -47,7 +47,7 @@ module API ...@@ -47,7 +47,7 @@ module API
requires :artifact_path, type: String, desc: 'Artifact path' requires :artifact_path, type: String, desc: 'Artifact path'
end end
route_setting :authentication, job_token_allowed: true route_setting :authentication, job_token_allowed: true
get ':id/jobs/artifacts/:ref_name/raw/*artifact_path', get ':id/jobs/artifacts/:ref_name/raw/*artifact_path', urgency: :low,
format: false, format: false,
requirements: { ref_name: /.+/ } do requirements: { ref_name: /.+/ } do
authorize_download_artifacts! authorize_download_artifacts!
...@@ -70,7 +70,7 @@ module API ...@@ -70,7 +70,7 @@ module API
requires :job_id, type: Integer, desc: 'The ID of a job' requires :job_id, type: Integer, desc: 'The ID of a job'
end end
route_setting :authentication, job_token_allowed: true route_setting :authentication, job_token_allowed: true
get ':id/jobs/:job_id/artifacts' do get ':id/jobs/:job_id/artifacts', urgency: :low do
authorize_download_artifacts! authorize_download_artifacts!
build = find_build!(params[:job_id]) build = find_build!(params[:job_id])
......
...@@ -179,7 +179,7 @@ module API ...@@ -179,7 +179,7 @@ module API
params do params do
requires :pipeline_id, type: Integer, desc: 'The pipeline ID' requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end end
get ':id/pipelines/:pipeline_id/test_report', feature_category: :code_testing do get ':id/pipelines/:pipeline_id/test_report', feature_category: :code_testing, urgency: :low do
authorize! :read_build, pipeline authorize! :read_build, pipeline
present pipeline.test_reports, with: TestReportEntity, details: true present pipeline.test_reports, with: TestReportEntity, details: true
......
...@@ -247,7 +247,7 @@ module API ...@@ -247,7 +247,7 @@ module API
optional :artifact_type, type: String, desc: %q(The type of artifact), optional :artifact_type, type: String, desc: %q(The type of artifact),
default: 'archive', values: ::Ci::JobArtifact.file_types.keys default: 'archive', values: ::Ci::JobArtifact.file_types.keys
end end
post '/:id/artifacts/authorize', feature_category: :build_artifacts do post '/:id/artifacts/authorize', feature_category: :build_artifacts, urgency: :low do
not_allowed! unless Gitlab.config.artifacts.enabled not_allowed! unless Gitlab.config.artifacts.enabled
require_gitlab_workhorse! require_gitlab_workhorse!
...@@ -283,7 +283,7 @@ module API ...@@ -283,7 +283,7 @@ module API
default: 'zip', values: ::Ci::JobArtifact.file_formats.keys default: 'zip', values: ::Ci::JobArtifact.file_formats.keys
optional :metadata, type: ::API::Validations::Types::WorkhorseFile, desc: %(The artifact metadata to store (generated by Multipart middleware)) optional :metadata, type: ::API::Validations::Types::WorkhorseFile, desc: %(The artifact metadata to store (generated by Multipart middleware))
end end
post '/:id/artifacts', feature_category: :build_artifacts do post '/:id/artifacts', feature_category: :build_artifacts, urgency: :low do
not_allowed! unless Gitlab.config.artifacts.enabled not_allowed! unless Gitlab.config.artifacts.enabled
require_gitlab_workhorse! require_gitlab_workhorse!
......
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