Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/ci/pipelines.rb')
-rw-r--r--lib/api/ci/pipelines.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/api/ci/pipelines.rb b/lib/api/ci/pipelines.rb
index e0086f624a8..2d7a437ca08 100644
--- a/lib/api/ci/pipelines.rb
+++ b/lib/api/ci/pipelines.rb
@@ -123,7 +123,7 @@ module API
use :pagination
end
- get ':id/pipelines/:pipeline_id/jobs', feature_category: :continuous_integration do
+ get ':id/pipelines/:pipeline_id/jobs', urgency: :low, feature_category: :continuous_integration do
authorize!(:read_pipeline, user_project)
pipeline = user_project.all_pipelines.find(params[:pipeline_id])
@@ -223,9 +223,13 @@ module API
post ':id/pipelines/:pipeline_id/retry', feature_category: :continuous_integration do
authorize! :update_pipeline, pipeline
- pipeline.retry_failed(current_user)
+ response = pipeline.retry_failed(current_user)
- present pipeline, with: Entities::Ci::Pipeline
+ if response.success?
+ present pipeline, with: Entities::Ci::Pipeline
+ else
+ render_api_error!(response.errors.join(', '), response.http_status)
+ end
end
desc 'Cancel all builds in the pipeline' do