A release's joined image is built once, on its PR: the merge publishes that image (PIPT-57) #213
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/pipeline-templates!213
Loading…
Reference in a new issue
No description provided.
Delete branch "joined-image-reuse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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-packagebuilds the image with that tag (VERSION, soAPP_VERSIONmatches the merge's) and keeps it as the run'scheck-imageartifact; the merge'sfinalizeand a module'smodulejob get the job token for the lookup.release/image.mjspasses the run to look in: the release suite'scheck-package, or for a module, the cluster-service suite'scheck-image(joinedCheck).prior-image.mjs:findPriorImagetakes the job name of the run's image check (defaultcheck-image).cluster-service/ci.yml: the PR stamps and attests a module's joined image too (itscluster-image-checkalready limits it to images that suite checks).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:CI_IMAGE_V1besideCI_BUILD_V1; check-package built the image stamped v0.1.62 as sha256:6a515c57… and kept it (check-image, 93 MB).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.