Add staging dev relay image workflow (#6709)

## Summary

Adds a manual, collaborator-triggered workflow for publishing pre-merge
Buzz relay runtime images for bb-block staging.

- Resolves a canonical `block/buzz` branch or tag to an immutable commit
SHA before checkout.
- Builds the relay runtime image for `linux/amd64` and `linux/arm64` and
publishes a single OCI index.
- Tags each publication uniquely as `dev-sha-<full
SHA>-run-<run_id>-<run_attempt>` so no tag is ever reused against the
immutable-tag utility ECR pull-through cache (rebuilds of the same SHA
aren't byte-identical, given mutable base tags and `apt-get update`).
- Uses the staging-only `ghcr.io/block/buzz-staging-dev` namespace,
which maps to a distinct utility ECR pull-through path.
- Restricts dispatch to `block/buzz` on `refs/heads/main`; job
permissions are narrowly scoped to `contents: read` plus `packages:
write`.
- Emits a deployment summary with the exact BPCI `repository` and unique
`tag` values, plus the merged manifest digest.
- Keeps the existing production/release image workflow unchanged.

The first real workflow run must confirm GHCR package creation/access
and utility ECR pull-through import for the new package.

---------

Signed-off-by: Brad Seiler <seiler@squareup.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: tornquist <tornquist@squareup.com>
Co-authored-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: tornquist <tornquist@squareup.com>
This commit is contained in:
Brad Seiler
2026-08-25 11:23:17 -04:00
committed by GitHub
parent 9d1e4b2576
commit 931747c9c4
2 changed files with 302 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# Staging dev relay images
Use the **Staging dev relay image** GitHub Actions workflow to publish a pre-merge Buzz relay runtime image for bb-block staging.
1. Run `.github/workflows/staging-dev-relay-image.yml` from the default branch.
2. Enter a `target_ref` from `block/buzz` (`my-branch`, `refs/heads/my-branch`, `my-tag`, or `refs/tags/my-tag`).
3. Wait for the workflow summary. It resolves that ref to a commit and publishes only the relay `runtime` image to:
```text
ghcr.io/block/buzz-staging-dev:dev-sha-<40-character-commit-sha>-run-<run-id>-<run-attempt>
```
4. In `squareup/builderbot-platform-core-infrastructure`, set bb-block staging values to the distinct pull-through ECR path and immutable tag from the workflow summary:
```yaml
buzz:
image:
repository: 929862310821.dkr.ecr.us-west-2.amazonaws.com/ghcr.io/block/buzz-staging-dev
tag: dev-sha-<40-character-commit-sha>-run-<run-id>-<run-attempt>
```
This path is intentionally separate from the production/main relay image path (`ghcr.io/block/buzz`) so a staging-only branch deployment is obvious in BPCI.
These images are for manual, pre-merge staging evaluation only. They are not release-qualified and must not be promoted to production or used by the canonical Kargo promotion path.
While bb-block remains a shared staging environment, do not deploy a target ref through this runtime-only path if it changes `migrations/` or requires changes to `deploy/charts/buzz/`. Backwards-compatible migrations can still leave the shared database ahead of the restored `main` image. Use an isolated environment or deployment-time enforcement for those changes.