runners: clean up temp files before exiting the runner

Clean up created temp files before exiting the runner.
This commit is contained in:
Miguel Martín 2023-11-21 08:40:59 +01:00 committed by Simon de Vlieger
parent 99af178c6d
commit bc04bfc366
6 changed files with 11 additions and 1 deletions

View file

@ -62,6 +62,10 @@ def tmpfiles():
subprocess.run(["systemd-tmpfiles", "--create"], check=False)
def remove_tmpfiles():
subprocess.run(["systemd-tmpfiles", "--clean", "--remove"], check=False)
def nsswitch():
# the default behavior is fine, but using nss-resolve does not
# necessarily work in a non-booted container, so make sure that
@ -90,7 +94,8 @@ def sequoia():
# images).
os.makedirs("/etc/crypto-policies", exist_ok=True)
shutil.copytree(
"/usr/share/crypto-policies/back-ends/DEFAULT", "/etc/crypto-policies/back-ends"
"/usr/share/crypto-policies/back-ends/DEFAULT",
"/etc/crypto-policies/back-ends"
)