diff options
Diffstat (limited to 'lib/api/ci/runner.rb')
-rw-r--r-- | lib/api/ci/runner.rb | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/api/ci/runner.rb b/lib/api/ci/runner.rb index 0bac6fe2054..aabcf34952c 100644 --- a/lib/api/ci/runner.rb +++ b/lib/api/ci/runner.rb @@ -3,12 +3,10 @@ module API module Ci class Runner < ::API::Base - helpers ::API::Helpers::Runner + helpers ::API::Ci::Helpers::Runner content_type :txt, 'text/plain' - feature_category :runner - resource :runners do desc 'Registers a new Runner' do success Entities::Ci::RunnerRegistrationDetails @@ -26,7 +24,7 @@ module API optional :tag_list, type: Array[String], coerce_with: ::API::Validations::Types::CommaSeparatedToArray.coerce, desc: %q(List of Runner's tags) optional :maximum_timeout, type: Integer, desc: 'Maximum timeout set when this Runner will handle the job' end - post '/' do + post '/', feature_category: :runner do attributes = attributes_for_keys([:description, :active, :locked, :run_untagged, :tag_list, :access_level, :maximum_timeout]) .merge(get_runner_details_from_request) @@ -59,7 +57,7 @@ module API params do requires :token, type: String, desc: %q(Runner's authentication token) end - delete '/' do + delete '/', feature_category: :runner do authenticate_runner! destroy_conditionally!(current_runner) @@ -71,7 +69,7 @@ module API params do requires :token, type: String, desc: %q(Runner's authentication token) end - post '/verify' do + post '/verify', feature_category: :runner do authenticate_runner! status 200 body "200" @@ -123,7 +121,7 @@ module API formatter :build_json, ->(object, _) { object } parser :build_json, ::Grape::Parser::Json - post '/request' do + post '/request', feature_category: :continuous_integration do authenticate_runner! unless current_runner.active? @@ -177,7 +175,7 @@ module API end optional :exit_code, type: Integer, desc: %q(Job's exit code) end - put '/:id' do + put '/:id', feature_category: :continuous_integration do job = authenticate_job! Gitlab::Metrics.add_event(:update_build) @@ -204,7 +202,7 @@ module API requires :id, type: Integer, desc: %q(Job's ID) optional :token, type: String, desc: %q(Job's authentication token) end - patch '/:id/trace' do + patch '/:id/trace', feature_category: :continuous_integration do job = authenticate_job! error!('400 Missing header Content-Range', 400) unless request.headers.key?('Content-Range') @@ -249,7 +247,7 @@ module API optional :artifact_type, type: String, desc: %q(The type of artifact), default: 'archive', values: ::Ci::JobArtifact.file_types.keys end - post '/:id/artifacts/authorize' do + post '/:id/artifacts/authorize', feature_category: :build_artifacts do not_allowed! unless Gitlab.config.artifacts.enabled require_gitlab_workhorse! @@ -285,7 +283,7 @@ module API 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)) end - post '/:id/artifacts' do + post '/:id/artifacts', feature_category: :build_artifacts do not_allowed! unless Gitlab.config.artifacts.enabled require_gitlab_workhorse! @@ -314,7 +312,7 @@ module API optional :token, type: String, desc: %q(Job's authentication token) optional :direct_download, default: false, type: Boolean, desc: %q(Perform direct download from remote storage instead of proxying artifacts) end - get '/:id/artifacts' do + get '/:id/artifacts', feature_category: :build_artifacts do job = authenticate_job!(require_running: false) present_carrierwave_file!(job.artifacts_file, supports_direct_download: params[:direct_download]) |