Stop the lint and test builds writing an image (closes #123) #124

Merged
clawbot merged 1 commits from issue-123-gate-builds-no-image into next 2026-10-07 12:02:02 +02:00
Collaborator

Implements #123.

script/lint and script/test now build their Dockerfile phase with --output type=cacheonly in place of -t "$tag-lint" / -t "$tag-test". They keep --no-cache and --target, so the phase still runs every time and a failing step still fails the build, but nothing is exported. Nothing used those images, and writing one out cost about 16 seconds of a Go repository's test build. The tag line goes, since neither script calls script/projectname any more. script/cibuild and script/docker keep their tags: they build the image that ships.

REPO_POLICIES.md replaces the "Every docker build in script/ is tagged" paragraph with one saying the gate builds write no image and why, and keeps the reason the shipping builds are tagged. Both checklists and the README's Entrypoints section follow. CODE_STYLEGUIDE_GO.md never said the gate builds are tagged and is unchanged.

Worth knowing:

  • --output needs BuildKit; the legacy builder rejects it.
  • The -lint and -test images that earlier runs tagged stay on each host until someone removes them.
  • Other repositories pick this up on their next re-vendor.

Disclosure:

  • Not tried on the Gitea runner.

Model: opus-5-5

Implements https://git.eeqj.de/sneak/prompts/issues/123. `script/lint` and `script/test` now build their `Dockerfile` phase with `--output type=cacheonly` in place of `-t "$tag-lint"` / `-t "$tag-test"`. They keep `--no-cache` and `--target`, so the phase still runs every time and a failing step still fails the build, but nothing is exported. Nothing used those images, and writing one out cost about 16 seconds of a Go repository's test build. The tag line goes, since neither script calls `script/projectname` any more. `script/cibuild` and `script/docker` keep their tags: they build the image that ships. `REPO_POLICIES.md` replaces the "Every `docker build` in `script/` is tagged" paragraph with one saying the gate builds write no image and why, and keeps the reason the shipping builds are tagged. Both checklists and the README's Entrypoints section follow. `CODE_STYLEGUIDE_GO.md` never said the gate builds are tagged and is unchanged. Worth knowing: - `--output` needs BuildKit; the legacy builder rejects it. - The `-lint` and `-test` images that earlier runs tagged stay on each host until someone removes them. - Other repositories pick this up on their next re-vendor. Disclosure: - Not tried on the Gitea runner. Model: opus-5-5
clawbot added the needs-review label 2026-10-07 11:09:09 +02:00
clawbot self-assigned this 2026-10-07 11:09:09 +02:00
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot added needs-rebase and removed needs-review labels 2026-10-07 11:31:53 +02:00
clawbot added 1 commit 2026-10-07 11:34:33 +02:00
script/lint and script/test build their Dockerfile phase with
--output type=cacheonly in place of a tag. The phase still runs
uncached and a failing step still fails the build, but no image is
written: nothing used those images, and writing one out took about 16
seconds of a Go repository's test build. script/cibuild and
script/docker keep their tags. REPO_POLICIES.md, both checklists and
the README now say the gate builds write no image.

Model: opus-5-5
clawbot force-pushed issue-123-gate-builds-no-image from 005081e653 to c22da615ba 2026-10-07 11:34:33 +02:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-10-07 11:34:38 +02:00
Author
Collaborator

Rebased onto next after #121. Git reported no conflict, but it put this PR's TODO.md Completed Steps entry inside the entry from #121, so that entry stopped mid-sentence. I put both entries back whole, this PR's on top. REPO_POLICIES.md and both checklists took both changes as they were, and last_modified was already today. No wording changed.

Model: opus-5-5

Rebased onto `next` after https://git.eeqj.de/sneak/prompts/pulls/121. Git reported no conflict, but it put this PR's `TODO.md` Completed Steps entry inside the entry from https://git.eeqj.de/sneak/prompts/pulls/121, so that entry stopped mid-sentence. I put both entries back whole, this PR's on top. `REPO_POLICIES.md` and both checklists took both changes as they were, and `last_modified` was already today. No wording changed. Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 1d9b046b91 into next 2026-10-07 12:02:02 +02:00
clawbot deleted branch issue-123-gate-builds-no-image 2026-10-07 12:02:03 +02:00
Sign in to join this conversation.