Skip to content

Commit f887a8b

Browse files
committed
Document GHCR credential precondition for pinned smoke
1 parent e13295b commit f887a8b

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,18 @@ jobs:
3535
run: make e2e-adapters
3636

3737
- name: Generic live smoke with pinned GHCR images
38+
if: ${{ secrets.MB3R_GHCR_USERNAME != '' && secrets.MB3R_GHCR_TOKEN != '' }}
3839
env:
39-
GITHUB_ACTOR: ${{ github.actor }}
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
MB3R_GHCR_USERNAME: ${{ secrets.MB3R_GHCR_USERNAME }}
41+
MB3R_GHCR_TOKEN: ${{ secrets.MB3R_GHCR_TOKEN }}
4142
run: make k8s-smoke-generic-pinned
4243

44+
- name: Note pinned GHCR smoke precondition
45+
if: ${{ !(secrets.MB3R_GHCR_USERNAME != '' && secrets.MB3R_GHCR_TOKEN != '') }}
46+
run: |
47+
echo "::warning::Pinned GHCR smoke skipped because MB3R_GHCR_USERNAME and MB3R_GHCR_TOKEN are not configured."
48+
echo "::warning::Repo-scoped GITHUB_TOKEN does not currently prove cross-repo pull access to upstream Bering/Sheaft GHCR packages."
49+
4350
- name: Package chart
4451
run: make chart-package
4552

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ python scripts/tasks.py e2e-adapters
8686
python scripts/tasks.py release-dry-run
8787
```
8888

89-
`make k8s-smoke-generic` verifies the live generic runtime contract with locally rebuilt images from the pinned release binaries. `make k8s-smoke-generic-pinned` verifies the clean-cluster startup path for the chart's default pinned `ghcr.io/mb3r-lab/bering` and `ghcr.io/mb3r-lab/sheaft` images, using anonymous pull by default and a temporary `imagePullSecret` when `MB3R_GHCR_USERNAME` and `MB3R_GHCR_TOKEN` are set. Repository CI wires that pinned-image smoke through `GITHUB_TOKEN` with `packages:read` so pull/auth regressions fail on push.
89+
`make k8s-smoke-generic` verifies the live generic runtime contract with locally rebuilt images from the pinned release binaries. `make k8s-smoke-generic-pinned` verifies the clean-cluster startup path for the chart's default pinned `ghcr.io/mb3r-lab/bering` and `ghcr.io/mb3r-lab/sheaft` images, using anonymous pull by default and a temporary `imagePullSecret` when `MB3R_GHCR_USERNAME` and `MB3R_GHCR_TOKEN` are set. Repository CI runs that pinned-image smoke only when those explicit cross-repo GHCR credentials are configured; the repo-scoped `GITHUB_TOKEN` is not treated as sufficient proof of upstream package pullability.
9090

9191
## Compatibility Notes
9292

docs/verification/generic-e2e.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ What it checks:
1818
- live-cluster install smoke through `kind` with locally rebuilt images from the pinned release binaries
1919
- clean-cluster startup of the chart's default pinned `ghcr.io/mb3r-lab/bering` and `ghcr.io/mb3r-lab/sheaft` images
2020
- anonymous pull by default for pinned-image smoke, with an optional temporary `imagePullSecret` from `MB3R_GHCR_USERNAME` and `MB3R_GHCR_TOKEN`
21-
- pinned-image smoke wired into repository CI through `GITHUB_TOKEN` with `packages:read`
21+
- pinned-image smoke wired into repository CI only when explicit `MB3R_GHCR_USERNAME` and `MB3R_GHCR_TOKEN` secrets are configured
22+
- repo-scoped `GITHUB_TOKEN` is not assumed to prove cross-repo pullability of the upstream Bering/Sheaft GHCR packages
2223
- explicit failure attribution when Kubernetes reports image-pull or auth errors instead of letting them collapse into a generic timeout
2324

2425
If this path fails, generic stack readiness is not proven even if the OTel Demo profile still passes.

scripts/live_k8s_smoke.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,16 @@ def configure_ghcr_pull_secret(kubectl_bin: Path, credentials: tuple[str, str] |
137137

138138

139139
def enrich_failure_message(message: str) -> str:
140-
if "401 Unauthorized" in message or "failed to authorize" in message:
140+
if (
141+
"401 Unauthorized" in message
142+
or "403 Forbidden" in message
143+
or "failed to authorize" in message
144+
):
141145
return (
142146
f"{message} "
143147
"Set MB3R_GHCR_USERNAME/MB3R_GHCR_TOKEN or GITHUB_ACTOR/GITHUB_TOKEN "
144-
"to validate authenticated pulls for pinned GHCR images."
148+
"to validate authenticated pulls for pinned GHCR images. "
149+
"A 403 usually means the provided token does not have pull access to the upstream package."
145150
)
146151
return message
147152

0 commit comments

Comments
 (0)