test(ci): self-test that --cli-install=binary generates and runs against a real release - #655
Merged
Merged
Conversation
…unners Add a self-contained workflow that both generates a binary-mode workflow and executes the emitted Setup CLI step against a published release, on a weekly schedule and on demand only (never on push/PR, so the live cosign path is not a merge gate). Asserts no third-party install action is emitted, the sha256 gate and pinned cosign identity are present, keyless cosign verification succeeds on linux, and the documented sha256-only fallback fires on macos. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #654.
Problem
--cli-install=binary(#653) emits a self-contained CLI install whose live path (resolve tag, download, sha256 gate, keyless cosign verify with cosign fetched by pinned checksum) is not exercised by the PR gate or by any fleet lane. It needs to be proven that binary mode both generates as expected and runs as expected on real runners, without standing up a fleet member.Fix
A standalone self-test workflow,
cli-install-selftest.yaml,workflow_dispatch+ weeklyscheduleonly (never push/PR, so its network dependency cannot flake the merge gate). One matrix job across linux and macos, both arches, proves both halves so what is generated is provably what runs:generate-workflow --cli-install=binaryon a minimal manifest, then assert the output carries nosetup-cliaction and nosigstore/cosign-installer, keeps the mandatorysha256sum -cgate, and pins the cosign identity/issuer. actionlint runs the generated file.yqand execute it verbatim against the published v1.0.0, then assertcascade versionreports 1.0.0. On linux the log MUST showcosign signature on checksums.txt verified.(fail if it silently fell back). On macos, where binary mode has no pinned cosign, it asserts the documented sha256-only fallback fired, so the linux-only cosign behavior is a tested outcome rather than a silent gap.permissions: contents: read;github.tokenonly, no new secret.Verification
cascade versionprinted 1.0.0, and both documented fallback warnings fired (no pinned cosign for darwin/arm64 -> sha256-only).