summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEric Engestrom <eric@igalia.com>2024-02-07 16:43:29 +0000
committerMarge Bot <emma+marge@anholt.net>2024-02-08 22:22:54 +0000
commit5bc1a62fbb62b9697c30a8587a79975190183e5a (patch)
tree655445dc9c4812f39d7babaf1708931a508e0448 /bin
parentbce1230587d8ebf611b5286973c4cb814025a94c (diff)
ci_run_n_monitor: add method to get a pipeline job by its id
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ci/ci_run_n_monitor.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py
index f2489bcf0de..800d3d57e8c 100755
--- a/bin/ci/ci_run_n_monitor.py
+++ b/bin/ci/ci_run_n_monitor.py
@@ -191,6 +191,14 @@ def monitor_pipeline(
pretty_wait(REFRESH_WAIT_JOBS)
+def get_pipeline_job(
+ pipeline: gitlab.v4.objects.ProjectPipeline,
+ id: int,
+) -> gitlab.v4.objects.ProjectPipelineJob:
+ pipeline_jobs = pipeline.jobs.list(all=True)
+ return [j for j in pipeline_jobs if j.id == id][0]
+
+
def enable_job(
project: gitlab.v4.objects.Project,
pipeline: gitlab.v4.objects.ProjectPipeline,