summaryrefslogtreecommitdiff
path: root/lib/api/jobs.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
commit85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch)
tree9160f299afd8c80c038f08e1545be119f5e3f1e1 /lib/api/jobs.rb
parent15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff)
downloadgitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'lib/api/jobs.rb')
-rw-r--r--lib/api/jobs.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index 084c146abe7..ad46d948f3b 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -48,54 +48,6 @@ module API
end
# rubocop: enable CodeReuse/ActiveRecord
- desc 'Get pipeline jobs' do
- success Entities::Ci::Job
- end
- params do
- requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
- use :optional_scope
- use :pagination
- end
- # rubocop: disable CodeReuse/ActiveRecord
- get ':id/pipelines/:pipeline_id/jobs' do
- authorize!(:read_pipeline, user_project)
- pipeline = user_project.all_pipelines.find(params[:pipeline_id])
- authorize!(:read_build, pipeline)
-
- builds = pipeline.builds
- builds = filter_builds(builds, params[:scope])
- builds = builds.preload(:job_artifacts_archive, :job_artifacts, project: [:namespace])
-
- present paginate(builds), with: Entities::Ci::Job
- end
- # rubocop: enable CodeReuse/ActiveRecord
-
- desc 'Get pipeline bridge jobs' do
- success ::API::Entities::Ci::Bridge
- end
- params do
- requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
- use :optional_scope
- use :pagination
- end
- # rubocop: disable CodeReuse/ActiveRecord
- get ':id/pipelines/:pipeline_id/bridges' do
- authorize!(:read_build, user_project)
- pipeline = user_project.ci_pipelines.find(params[:pipeline_id])
- authorize!(:read_pipeline, pipeline)
-
- bridges = pipeline.bridges
- bridges = filter_builds(bridges, params[:scope])
- bridges = bridges.preload(
- :metadata,
- downstream_pipeline: [project: [:route, { namespace: :route }]],
- project: [:namespace]
- )
-
- present paginate(bridges), with: ::API::Entities::Ci::Bridge
- end
- # rubocop: enable CodeReuse/ActiveRecord
-
desc 'Get a specific job of a project' do
success Entities::Ci::Job
end