mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 08:08:06 +02:00
ci_run_n_monitor: add support for new canceling job status
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29917>
This commit is contained in:
parent
2fbdc4d462
commit
fa3d529f55
1 changed files with 4 additions and 2 deletions
|
|
@ -53,6 +53,7 @@ STATUS_COLORS = {
|
|||
"success": Fore.GREEN,
|
||||
"failed": Fore.RED,
|
||||
"canceled": Fore.MAGENTA,
|
||||
"canceling": Fore.MAGENTA,
|
||||
"manual": "",
|
||||
"pending": "",
|
||||
"skipped": "",
|
||||
|
|
@ -63,7 +64,7 @@ COMPLETED_STATUSES = ["success", "failed"]
|
|||
|
||||
def print_job_status(job, new_status=False) -> None:
|
||||
"""It prints a nice, colored job status with a link to the job."""
|
||||
if job.status == "canceled":
|
||||
if job.status in {"canceled", "canceling"}:
|
||||
return
|
||||
|
||||
if new_status and job.status == "created":
|
||||
|
|
@ -236,7 +237,7 @@ def enable_job(
|
|||
|
||||
pjob = project.jobs.get(job.id, lazy=True)
|
||||
|
||||
if job.status in ["success", "failed", "canceled"]:
|
||||
if job.status in ["success", "failed", "canceled", "canceling"]:
|
||||
new_job = pjob.retry()
|
||||
job = get_pipeline_job(pipeline, new_job["id"])
|
||||
else:
|
||||
|
|
@ -259,6 +260,7 @@ def cancel_job(project, job) -> None:
|
|||
"""Cancel GitLab job"""
|
||||
if job.status in [
|
||||
"canceled",
|
||||
"canceling",
|
||||
"success",
|
||||
"failed",
|
||||
"skipped",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue