Loading ci/get_id_of_last_job_occurence.py +5 −2 Original line number Diff line number Diff line Loading @@ -65,9 +65,12 @@ def get_job_id(branch_name, job_name, project_id, success_only): if job_name not in resp_jobs.text: continue # find actual job by name # find actual job by name, exclude timed out or stuck jobs for job in resp_jobs.json(): if job["name"] == job_name: name_matches = job["name"] == job_name is_success = job["status"] == "success" has_timed_out = job.get("failure_reason", "") == "stuck_or_timeout_failure" if name_matches and (is_success or not has_timed_out): job_id = job["id"] break if job_id >= 0: Loading Loading
ci/get_id_of_last_job_occurence.py +5 −2 Original line number Diff line number Diff line Loading @@ -65,9 +65,12 @@ def get_job_id(branch_name, job_name, project_id, success_only): if job_name not in resp_jobs.text: continue # find actual job by name # find actual job by name, exclude timed out or stuck jobs for job in resp_jobs.json(): if job["name"] == job_name: name_matches = job["name"] == job_name is_success = job["status"] == "success" has_timed_out = job.get("failure_reason", "") == "stuck_or_timeout_failure" if name_matches and (is_success or not has_timed_out): job_id = job["id"] break if job_id >= 0: Loading