commit 76ff449d8cca298eaab9883411e139b0a9ef913d parent 98ae086f431bb27f9d128bb6c5484bbda94ef86f Author: Devan Carpenter <devan@taler.net> Date: Wed, 9 Oct 2024 16:12:43 +0100 add unit and timer to cleanup CI artifacts Diffstat:
| A | systemd-services/hosts/gv/users/container-worker/ci-artifact-cleanup.service | | | 7 | +++++++ |
| A | systemd-services/hosts/gv/users/container-worker/ci-artifact-cleanup.timer | | | 9 | +++++++++ |
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/systemd-services/hosts/gv/users/container-worker/ci-artifact-cleanup.service b/systemd-services/hosts/gv/users/container-worker/ci-artifact-cleanup.service @@ -0,0 +1,7 @@ +[Unit] +Description=Cleanup ephemeral CI artifacts +AssertPathExists=/home/container-worker/ephemeral-ci-artifacts + +[Service] +Type=oneshot +ExecStart=/usr/bin/rm -rf /home/container-worker/ephemeral_ci_artifacts/* diff --git a/systemd-services/hosts/gv/users/container-worker/ci-artifact-cleanup.timer b/systemd-services/hosts/gv/users/container-worker/ci-artifact-cleanup.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run artifacts cleanup daily and on boot + +[Timer] +OnCalendar=*-*-* 03:30:00 +Persistent=true + +[Install] +WantedBy=timers.target