improves readbilty of soft fail logic.

This commit is contained in:
gilbn 2022-09-27 20:36:30 +02:00
parent ee85fe2306
commit dad3ca5fe7

View File

@ -7,8 +7,10 @@ from ci.logger import configure_logging
def run_test():
"""Run tests on container tags then build and upload reports"""
ci.run(ci.tags)
# Don't set the whole report as failed if any of the ARM tag fails.
ci.report_status = 'FAIL' if [ci.report_containers[tag]['test_success'] == False for tag in ci.report_containers.keys() if tag.startswith("amd64")][0] else 'PASS'
# Don't set the whole report as failed if any of the ARM tag fails.
for tag in ci.report_containers.keys():
if tag.startswith("amd64") and ci.report_containers[tag]['test_success'] == True:
ci.report_status = 'PASS' # Override the report_status if an ARM tag failed, but the amd64 tag passed.
ci.report_render()
ci.badge_render()
ci.json_render()