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
74 ./deploy/copy.sh $(HOST) $(PORT) $(RUNNER_BIN) /usr/local/bin/gitbay-runner.new 74 ./deploy/copy.sh $(HOST) $(PORT) $(RUNNER_BIN) /usr/local/bin/gitbay-runner.new
75 ssh -p $(PORT) root@$(HOST) 'mkdir -p /etc/systemd/system/gitbay-runner.service.d' 75 ssh -p $(PORT) root@$(HOST) 'mkdir -p /etc/systemd/system/gitbay-runner.service.d'
76 ./deploy/copy.sh $(HOST) $(PORT) deploy/gitbay-runner.override.conf /etc/systemd/system/gitbay-runner.service.d/override.conf 76 ./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
77 ssh -p $(PORT) root@$(HOST) 'set -eu; \ 79 ssh -p $(PORT) root@$(HOST) 'set -eu; \
78 chmod 755 /usr/local/bin/gitbay-runner.new; \ 80 chmod 755 /usr/local/bin/gitbay-runner.new; \
79 mv /usr/local/bin/gitbay-runner.new /usr/local/bin/gitbay-runner; \ 81 mv /usr/local/bin/gitbay-runner.new /usr/local/bin/gitbay-runner; \
80 systemctl daemon-reload; \ 82 systemctl daemon-reload; \
83 systemctl enable --now gitbay-runner-prune.timer; \
81 systemctl restart gitbay-runner; \ 84 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
7[Service] 7[Service]
8Type=oneshot 8Type=oneshot
9User=ci-runner 9User=ci-runner
10# Rootless podman reads storage.conf under HOME; a User= unit does not
11# set it.
12Environment=HOME=/var/lib/gitbay-runner
10# Images not used by a container and older than a week. A build that 13# Images not used by a container and older than a week. A build that
11# names an image again re-pulls it; the cost is one pull, not a failure. 14# names an image again re-pulls it; the cost is one pull, not a failure.
12ExecStart=/usr/bin/podman image prune --all --force --filter until=168h 15ExecStart=/usr/bin/podman image prune --all --force --filter until=168h