Commit c8bc377b47

c8bc377b47bbeba851af3317f8c17ec2a546b45c

parent: 89eba6adea

Verified · cmc ci/build: success ci/test: success ci/vuln: success

cmc <hello@cleberg.net> · 2026-09-07 02:23 UTC

deploy: install the image prune timer with the runner

The unit files existed but deploy-runner never copied or enabled them,
so the image store grew unbounded.

Ref #144

Layout: unified · split

Makefile +5 −1
@@ -74,9 +74,13 @@ deploy-runner: preflight
7474 ./deploy/copy.sh $(HOST) $(PORT) $(RUNNER_BIN) /usr/local/bin/gitbay-runner.new
7575 ssh -p $(PORT) root@$(HOST) 'mkdir -p /etc/systemd/system/gitbay-runner.service.d'
7676 ./deploy/copy.sh $(HOST) $(PORT) deploy/gitbay-runner.override.conf /etc/systemd/system/gitbay-runner.service.d/override.conf
77 ./deploy/copy.sh $(HOST) $(PORT) deploy/gitbay-runner-prune.service /etc/systemd/system/gitbay-runner-prune.service
78 ./deploy/copy.sh $(HOST) $(PORT) deploy/gitbay-runner-prune.timer /etc/systemd/system/gitbay-runner-prune.timer
7779 ssh -p $(PORT) root@$(HOST) 'set -eu; \
7880 chmod 755 /usr/local/bin/gitbay-runner.new; \
7981 mv /usr/local/bin/gitbay-runner.new /usr/local/bin/gitbay-runner; \
8082 systemctl daemon-reload; \
83 systemctl enable --now gitbay-runner-prune.timer; \
8184 systemctl restart gitbay-runner; \
82 systemctl --no-pager --lines=3 status gitbay-runner'
85 systemctl --no-pager --lines=3 status gitbay-runner; \
86 systemctl --no-pager list-timers gitbay-runner-prune.timer'
deploy/gitbay-runner-prune.service +3
@@ -7,6 +7,9 @@ Description=Prune unused podman images on the CI runner
77[Service]
88Type=oneshot
99User=ci-runner
10# Rootless podman reads storage.conf under HOME; a User= unit does not
11# set it.
12Environment=HOME=/var/lib/gitbay-runner
1013# Images not used by a container and older than a week. A build that
1114# names an image again re-pulls it; the cost is one pull, not a failure.
1215ExecStart=/usr/bin/podman image prune --all --force --filter until=168h