A release's joined image is built once, on its PR: the merge publishes that image (PIPT-57) #213

Merged
merge-queue merged 1 commit from joined-image-reuse into main 2026-11-20 23:12:28 -08:00
Owner

Work package: https://openproject.home.romaine.life/wp/PIPT-57

PIPT-56 (#212) made a merge publish the image its PR built for a cluster service's or web app's own image. An image joined to a release-suite build (spotify-player, tuimail, auth, and fzt-frontend's module image) was still built again on the merge. This extends the same mechanism, cluster-service/prior-image.mjs, to them; nothing new is added beside it.

Changed:

  • release/ci.yml: the PR's scope attests the joined image's fingerprint (prior-image.mjs attest <kind>, the same marker and fingerprint as a service's own image) with the tag its merge would take; check-package builds the image with that tag (VERSION, so APP_VERSION matches the merge's) and keeps it as the run's check-image artifact; the merge's finalize and a module's module job get the job token for the lookup.
  • release/image.mjs passes the run to look in: the release suite's check-package, or for a module, the cluster-service suite's check-image (joinedCheck).
  • prior-image.mjs: findPriorImage takes the job name of the run's image check (default check-image).
  • cluster-service/ci.yml: the PR stamps and attests a module's joined image too (its cluster-image-check already limits it to images that suite checks).
  • README: the joined-image and PR-build sections and rule 1.

Unchanged: a joined cluster image whose inputs didn't change since the pinned release still carries the pinned image on (no build, no push); an image whose Dockerfile declares ARG SOURCE_SHA (tuimail, landing-page) is still built on the merge; a lookup that fails or finds nothing builds as before.

Proven live on romaine-life/auth through CI_SUITES_REF=joined-image-reuse (since removed), with a real merged PR, romaine-life/auth#178:

  • PR release run https://forgejo.romaine.life/romaine-life/auth/actions/runs/436: the scope attested CI_IMAGE_V1 beside CI_BUILD_V1; check-package built the image stamped v0.1.62 as sha256:6a515c57… and kept it (check-image, 93 MB).
  • Merge release run https://forgejo.romaine.life/romaine-life/auth/actions/runs/442: reserve took v0.1.62 and found run 436 ("publishing its files"), the build job was skipped, and finalize pushed romainecr.azurecr.io/auth:v0.1.62@sha256:6a515c57…, "the image pull request #178's run 16952 built; nothing was built here". v0.1.62 has v0.1.61's asset names; its Linux and macOS binaries are byte-identical to the PR's, the Windows one differs by the 1832-byte signature finalize adds. home-sync and deploy-image succeeded (pin PR romaine-life/auth#179), and this PC runs romaine-auth v0.1.62.
Work package: https://openproject.home.romaine.life/wp/PIPT-57 PIPT-56 (#212) made a merge publish the image its PR built for a cluster service's or web app's own image. An image joined to a release-suite build (spotify-player, tuimail, auth, and fzt-frontend's module image) was still built again on the merge. This extends the same mechanism, `cluster-service/prior-image.mjs`, to them; nothing new is added beside it. Changed: - `release/ci.yml`: the PR's scope attests the joined image's fingerprint (`prior-image.mjs attest <kind>`, the same marker and fingerprint as a service's own image) with the tag its merge would take; `check-package` builds the image with that tag (`VERSION`, so `APP_VERSION` matches the merge's) and keeps it as the run's `check-image` artifact; the merge's `finalize` and a module's `module` job get the job token for the lookup. - `release/image.mjs` passes the run to look in: the release suite's `check-package`, or for a module, the cluster-service suite's `check-image` (`joinedCheck`). - `prior-image.mjs`: `findPriorImage` takes the job name of the run's image check (default `check-image`). - `cluster-service/ci.yml`: the PR stamps and attests a module's joined image too (its `cluster-image-check` already limits it to images that suite checks). - README: the joined-image and PR-build sections and rule 1. Unchanged: a joined cluster image whose inputs didn't change since the pinned release still carries the pinned image on (no build, no push); an image whose Dockerfile declares `ARG SOURCE_SHA` (tuimail, landing-page) is still built on the merge; a lookup that fails or finds nothing builds as before. Proven live on romaine-life/auth through `CI_SUITES_REF=joined-image-reuse` (since removed), with a real merged PR, https://forgejo.romaine.life/romaine-life/auth/pulls/178: - PR release run https://forgejo.romaine.life/romaine-life/auth/actions/runs/436: the scope attested `CI_IMAGE_V1` beside `CI_BUILD_V1`; check-package built the image stamped v0.1.62 as sha256:6a515c57… and kept it (`check-image`, 93 MB). - Merge release run https://forgejo.romaine.life/romaine-life/auth/actions/runs/442: reserve took v0.1.62 and found run 436 ("publishing its files"), the build job was skipped, and finalize pushed `romainecr.azurecr.io/auth:v0.1.62@sha256:6a515c57…`, "the image pull request #178's run 16952 built; nothing was built here". v0.1.62 has v0.1.61's asset names; its Linux and macOS binaries are byte-identical to the PR's, the Windows one differs by the 1832-byte signature finalize adds. home-sync and deploy-image succeeded (pin PR https://forgejo.romaine.life/romaine-life/auth/pulls/179), and this PC runs romaine-auth v0.1.62.
A release's joined image is built once, on its PR: the merge publishes that image (PIPT-57)
All checks were successful
Fleet / align (pull_request) Successful in 1s
CI / changes (pull_request) Successful in 3s
CI / prune-releases (pull_request) Has been skipped
CI / release-version (pull_request) Has been skipped
CI / check-versions (pull_request) Has been skipped
CI / check-fetches (pull_request) Has been skipped
CI / check-image-digests (pull_request) Has been skipped
CI / cached-images (pull_request) Has been skipped
CI / container-health (pull_request) Has been skipped
CI / azure-cli (pull_request) Has been skipped
CI / home-cache-linux (pull_request) Has been skipped
CI / home-cache-windows (pull_request) Has been skipped
CI / cache-save (ubuntu-latest) (pull_request) Has been skipped
CI / cache-save (windows-latest) (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 4s
Suite default / check-fetches (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
CI / actionlint (pull_request) Successful in 9s
Suite default / reused-checks (pull_request) Successful in 15s
CI / service-runtime (two) (pull_request) Successful in 21s
CI / service-runtime (one) (pull_request) Successful in 21s
CI / service-cancellation (pull_request) Successful in 27s
CI / suite-tests-linux (pull_request) Successful in 30s
CI / suite-tests-windows (pull_request) Successful in 57s
CI / setup-linux (nas) (pull_request) Successful in 1m14s
CI / setup-windows (pull_request) Successful in 2m26s
merge-queue landed on main
eb1412b024
merge-queue deleted branch joined-image-reuse 2026-11-20 23:12:28 -08:00
Sign in to join this conversation.
No description provided.