Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/maintainers/container-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ For local authenticated builds, add
- A draft GitHub release reserves the next revision **before building** the image,
allowing the exact revision to be embedded during the build. Its initial body
identifies the source commit and track and states that publication is pending.
Reservation also returns the numeric GitHub release ID. Finalization retrieves
the draft by this ID, since GitHub's get-by-tag endpoint excludes draft releases.
After tests and upload, `container-release finalize` verifies the draft still
belongs to this commit and track, rechecks revision-tag availability, and fills
its notes with the tested digest and final-image OS metadata. It does not
Expand All @@ -193,6 +195,10 @@ For local authenticated builds, add
These use `ID` and `VERSION_ID` from `/etc/os-release` (falling back to `/usr/lib/os-release`); Debian uses `/etc/debian_version` when available to include the point release, such as `13.7`.
Metadata generation does not run the image's entrypoint and fails if OS identifiers are missing or invalid.
PR builds generate a temporary, synthetic `release.json` using the same metadata generation and validation as real releases, including for fork PRs that cannot publish images.
They also rehearse revision reservation and draft finalization against the
tested local image. A fake GitHub API models draft lookup by release ID and
rejects draft lookup by tag, so that failure is caught before merge. The
rehearsal never creates or edits real releases or contacts the registry.
Validation checks all required fields, including OS metadata from a locally loaded image of the first declared platform. Empty or invalid required values fail the job.
This fixture uses placeholder revision `r0` and the real tested OCI archive digest. It stays in the runner's temporary directory and does not reserve a revision, create a GitHub release, or publish release tags.
The GitHub release's `published_at` is the authoritative publication timestamp.
Expand Down Expand Up @@ -676,9 +682,9 @@ Publication commands receive `APP_VERSION` (the application version, without an
Only the Containerfile's build argument receives a full APT package pin.
The `plan` command always reads `meta.yaml` from the current directory; it has no alternate path or environment fallback.
The `reserve` command creates a real draft release before building and does not
require `IMAGE_DIGEST`. Its outputs include `tag`, `tags`, `package-version`,
require `IMAGE_DIGEST`. Its outputs include `release-id`, `tag`, `tags`, `package-version`,
and `latest`. After upload, `finalize` takes
`RELEASE_TAG`, `IMAGE_DIGEST`, and `PLATFORMS` alongside the publication inputs
`RELEASE_ID`, `RELEASE_TAG`, `IMAGE_DIGEST`, and `PLATFORMS` alongside the publication inputs
to fill that draft's release notes. Both commands modify GitHub releases;
use `go test` for validation without publishing.

Expand Down
9 changes: 9 additions & 0 deletions docs/maintainers/container-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ a preview package version without creating releases or consuming revisions.
the track; there is no automatic retry of the entire test.
4. Validate release metadata, including OS identification from the first tested
platform image, before any upload.
PRs also run one release-lifecycle rehearsal against that local image and a
fake GitHub API, exercising reservation, draft finalization, and metadata
generation without publishing anything.
5. Log in to GHCR and copy the original archive by digest with
`skopeo copy --all --preserve-digests`. This preserves the multiarchitecture
index, platform manifests, annotations, provenance, and SBOMs. There is no
Expand Down Expand Up @@ -70,6 +73,12 @@ author link that the application does not actually read. Sonarr, Radarr, and
Prowlarr check their authenticated status APIs using the disposable instance's
generated API key.

The status request retries up to four times with a ten-second socket timeout per
request, allowing for slow first requests under QEMU. Once a request succeeds,
missing or incorrect package metadata fails immediately; it is not retried.
Failure diagnostics print the request exit status or the expected and actual
package field, without dumping unrelated API response data or the API key.

The same script handles all tracks. Use the expected version argument instead
of hard-coding a release. Helpers and fixtures may live elsewhere under `tests/`;
the pipeline does not automatically execute every file in that directory.
Expand Down