ci(image): clean up after the image build and the deploy #50

Merged
whitlocktech merged 1 commits from chore/ci-self-cleanup into main 2026-11-04 06:11:02 -06:00
Member

What & why

The CI runners are filling up. Runner 65 (ubuntu-latest) is out of disk right now: every recent
task it took died at checkout with No space left on device.

The build job runs docker on the runner host's daemon (mounted socket), so whatever it leaves is
permanent. Each run left runicgateway-site:latest and :sha-<7>, and each newer :latest turned
the last one into another permanent :sha- image.

  • build: new if: always() step after the push. It removes this run's two tags, which are in
    the registry already, and caps BuildKit's cache at 5 GB (--keep-storage, falling back to its
    newer name --reserved-space). It never fails the job. BuildKit keeps the layer cache apart from
    the images, so builds stay cached.
  • deploy (rgcom): new final if: always() step, docker image prune -f. It drops the
    dangling image the pull replaced. Dangling images only; nothing tagged or in use is touched. A
    rollback pulls a sha- tag from the registry, so nothing it needs is lost.

Companion PRs: website (same build fix + demo-wipe prune), link / installer / Rust-Link
(rust-cache), docs.

How it was tested

  • The changed workflow parses (PyYAML) with the expected jobs and steps.
  • Not run live yet: the first real proof is the next merge to main. Its new step logs, then
    docker images on the build host and on the rgcom host.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why The CI runners are filling up. Runner 65 (`ubuntu-latest`) is out of disk right now: every recent task it took died at checkout with `No space left on device`. The build job runs docker on the runner **host's** daemon (mounted socket), so whatever it leaves is permanent. Each run left `runicgateway-site:latest` and `:sha-<7>`, and each newer `:latest` turned the last one into another permanent `:sha-` image. - **`build`:** new `if: always()` step after the push. It removes this run's two tags, which are in the registry already, and caps BuildKit's cache at 5 GB (`--keep-storage`, falling back to its newer name `--reserved-space`). It never fails the job. BuildKit keeps the layer cache apart from the images, so builds stay cached. - **`deploy` (`rgcom`):** new final `if: always()` step, `docker image prune -f`. It drops the dangling image the pull replaced. Dangling images only; nothing tagged or in use is touched. A rollback pulls a `sha-` tag from the registry, so nothing it needs is lost. Companion PRs: website (same build fix + demo-wipe prune), link / installer / Rust-Link (rust-cache), docs. ## How it was tested - The changed workflow parses (PyYAML) with the expected jobs and steps. - Not run live yet: the first real proof is the next merge to `main`. Its new step logs, then `docker images` on the build host and on the rgcom host. ## Checklist - [x] I have read CONTRIBUTING.md. - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-11-02 11:22:01 -06:00
ci(image): clean up after the image build and the deploy
All checks were successful
PR checks / checks (pull_request) Successful in 3m41s
080f9827b8
The build job runs docker on the runner host's daemon, so every run left
two tagged images behind for good. Remove this run's tags once they are
pushed and cap BuildKit's cache at 5 GB, always, never failing the job.

The deploy drops the dangling image its pull replaced on the rgcom host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit f38dec2ac4 into main 2026-11-04 06:11:02 -06:00
whitlocktech deleted branch chore/ci-self-cleanup 2026-11-04 06:11:05 -06:00
Sign in to join this conversation.
No description provided.