ЛР 3 — БПИ2303 — Костылев — на 5 #161

Closed
akostylev2303 wants to merge 101 commits from akostylev2303/lab3 AGit into master
Showing only changes of commit 55b99a24a4 - Show all commits
+3 -1
View File
@@ -215,9 +215,11 @@ def apply(base, settings, env, out):
compose("up", "-d", "--wait", "--wait-timeout", "180", env=env)
break
except subprocess.CalledProcessError as error:
log = Path(out) / "compose-up-failed.log"
log = Path(out) / "compose-up-failed.txt"
with log.open("a") as handle:
stamp = time.strftime("%FT%TZ", time.gmtime())
commit = subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
handle.write(f"date: {stamp} commit: {commit}\n")
handle.write(f"== {stamp} {base} attempt {attempt + 1}\n")
handle.write(error.stdout + error.stderr + "\n")
print(json.dumps({"compose_up_failed": attempt + 1, "log": str(log)}))