Skip to content

Commit 9088873

Browse files
prune docker buildx build cache after each image (swiftlang#496)
1 parent ce48f6d commit 9088873

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ci_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def main():
9696
'-t', image_name,
9797
docker_dir
9898
]
99+
clean_command = f"docker buildx prune -af"
100+
else:
101+
clean_command = f"docker image rm {image_name}"
99102

100103
status = run_command(cmd, log_file=log_file)
101104
results[dockerfile] = status
@@ -111,7 +114,7 @@ def main():
111114
run_command(cmd)
112115
print("[{}] - {}".format(results[dockerfile], dockerfile))
113116
sys.stdout.flush()
114-
run_command(f"docker image rm {image_name}")
117+
run_command(clean_command)
115118
run_command("docker image prune -f")
116119

117120
for dockerfile in dockerfiles:

0 commit comments

Comments
 (0)