summaryrefslogtreecommitdiff
path: root/scripts/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-25 18:14:13 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-25 18:14:13 +0000
commit1c635e68ea6fb392244f0d9f8c9dd2c7bd1c95e6 (patch)
tree052cfeba83f0db195c3861cd3a0173df30bb8a01 /scripts/api
parentd03aeb1110374d140a42622716597ccfa8e4ba57 (diff)
downloadgitlab-ce-1c635e68ea6fb392244f0d9f8c9dd2c7bd1c95e6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/api')
-rwxr-xr-xscripts/api/get_job_id.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/api/get_job_id.rb b/scripts/api/get_job_id.rb
index c32299706ba..2ee769d58f4 100755
--- a/scripts/api/get_job_id.rb
+++ b/scripts/api/get_job_id.rb
@@ -10,7 +10,7 @@ class JobFinder
pipeline_query: {}.freeze,
job_query: {}.freeze
).freeze
- MAX_PIPELINES_TO_ITERATE = 200
+ MAX_PIPELINES_TO_ITERATE = 20
def initialize(options)
@project = options.delete(:project)
@@ -51,7 +51,7 @@ class JobFinder
end
end
- raise 'Job not found!'
+ warn 'Job not found!'
end
def find_job_with_filtered_pipelines
@@ -63,7 +63,7 @@ class JobFinder
end
end
- raise 'Job not found!'
+ warn 'Job not found!'
end
def find_job_in_pipeline
@@ -73,7 +73,7 @@ class JobFinder
return job if found_job_by_name?(job) # rubocop:disable Cop/AvoidReturnFromBlocks
end
- raise 'Job not found!'
+ warn 'Job not found!'
end
def found_job_with_artifact?(job)
@@ -87,7 +87,7 @@ class JobFinder
end
def pipeline_query_params
- @pipeline_query_params ||= { per_page: 100, **pipeline_query }
+ @pipeline_query_params ||= { per_page: MAX_PIPELINES_TO_ITERATE, **pipeline_query }
end
def job_query_params