Catch issues with dockerd during the build

This commit is contained in:
Mikhail f. Shiryaev 2023-06-08 11:51:57 +02:00
parent fd919a288f
commit 2aaaec2abe
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -343,6 +343,15 @@ def main():
f"sudo chown -R ubuntu:ubuntu {build_output_path}", shell=True
)
logging.info("Build finished with %s, log path %s", success, log_path)
if not success:
# We check if docker works, because if it's down, it's infrastructure
try:
subprocess.check_call("docker info", shell=True)
except subprocess.CalledProcessError:
logging.error(
"The dockerd looks down, won't upload anything and generate report"
)
sys.exit(1)
# FIXME performance
performance_urls = []