1
0
Fork 0

ignore soft-failed jobs

This commit is contained in:
Mikhail Goncharov 2021-03-24 10:50:52 +01:00
parent b9ae114deb
commit daa36153e1

View file

@ -27,7 +27,7 @@ def get_failed_jobs(build: benedict) -> []:
failed_jobs = []
for j in build.get('jobs', []):
j = benedict(j)
if j.get('state') == 'failed' and j.get('name'):
if j.get('state') == 'failed' and j.get('name') and not job.get('soft_failed', False):
failed_jobs.append(j.get('name'))
return failed_jobs
@ -85,6 +85,9 @@ if __name__ == '__main__':
if job_state == 'passed' and i == 0:
# Skip successful first step as we assume it to be a pipeline setup
continue
if job_state == 'failed' and job.get('soft_failed', False):
# Ignore "soft failures".
continue
name = job.get('name')
if job.get('type') == 'trigger':
job_web_url = job.get('triggered_build.web_url', job_web_url)