Skip to content

ci: validate-then-tag gate chain with fleet on published artifact#212

Merged
joshua-temple merged 1 commit into
mainfrom
fix/ci-gate-chain
Jun 17, 2026
Merged

ci: validate-then-tag gate chain with fleet on published artifact#212
joshua-temple merged 1 commit into
mainfrom
fix/ci-gate-chain

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

The CI gate ladder did not validate trunk or PRs the way the badges imply, and Fleet E2E validated a pre-tag build rather than the published artifact:

  • Tests & Lint (validate.yaml) only ran via orchestrate's workflow_call and on tag pushes, so its ?branch=main badge showed no status (its only standalone run was on a tag ref).
  • Integration (act + gitea) (e2e.yaml) only ran on tags / merge_group, so it never gated a PR or populated a main badge.
  • Fleet E2E fanned out on the Integration workflow_run, validating the act+gitea build, not the binary actually published to the releases page.

Fix

  • validate.yaml: add push: { branches: [main] } and pull_request; drop push: { tags: [v*] }; keep workflow_call (orchestrate depends on it) and workflow_dispatch.
  • e2e.yaml: add push: { branches: [main] } and pull_request (both with the same cmd|e2e|go.mod|go.sum|internal paths filter that orchestrate already uses); drop push: { tags: [v*] }; keep merge_group and workflow_dispatch. Add concurrency: { group: integration-${{ github.ref }}, cancel-in-progress: true } so a superseded run on the same ref is cancelled rather than burning a second ~27min testcontainers slot.
  • fleet-e2e.yaml: re-point the workflow_run trigger from "Integration (act + gitea)" to "Release". Release runs GoReleaser on every rc tag push, so a successful Release run is the dependable signal that the published artifact exists. We key off the Release workflow_run (not the release: event) because promote-driven API releases do not reliably emit release: published (release.yaml feat: optional PR plan-preview workflow #86). The resolve job already derives the rc version from workflow_run.head_branch (with a head_sha tag-lookup fallback); the rc-tag gate (startsWith(.,'v') && contains(.,'-rc.')) and the no-op-on-filtered-completion behavior are unchanged.

Resulting chain

push/PR -> Tests & Lint + Integration gate -> rc tag (orchestrate, post its internal validate + build-cli) -> Release publishes the binary -> Fleet E2E validates the published artifact.

Verification

  • actionlint 1.7.12 clean on all three changed workflows.
  • README Tests & Lint badge already carried the correct alt text (no change needed).

Run Tests & Lint and Integration on push to main and on pull_request so
the trunk badges render and PRs are gated, dropping their tag triggers.
Add a concurrency group and paths filter to Integration so a superseded
or docs-only run does not burn a 27min testcontainers slot.

Re-point Fleet E2E from the Integration workflow_run to the Release
workflow_run so the fleet validates the published artifact: Release runs
GoReleaser on every rc tag, so a successful Release run means the binary
the suites install is on the releases page. The rc-tag gate and the
no-op-on-filtered-completion behavior are unchanged.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple merged commit 85ebea7 into main Jun 17, 2026
9 checks passed
@joshua-temple joshua-temple deleted the fix/ci-gate-chain branch June 17, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant