mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
fix(ci): export OCI archives for buildx calls that bypass image-tags (#3257)
Fork PRs build images to per-image OCI archives instead of pushing, gated on OCI_EXPORT_DIR. The `--output type=oci` was appended only inside the `image-tags` macro, so `packages/system/capi-providers-cpprovider`, whose `image:` recipe uses a hardcoded `--tag` and never calls `image-tags`, ran buildx with no exporter under export mode (PUSH/LOAD forced to 0). No archive was written, and the fork build's `if-no-files-found: error` upload then failed the whole build. Its `--cache-to type=inline` also needs an image exporter. - hack/common-envs.mk: extract the OCI-output snippet from `image-tags` into a reusable `oci-output <image-name>` macro so any buildx call can opt in; `image-tags` now ends with `$(call oci-output,$(1))` (no-op for the ~33 conforming packages). Move `comma :=` above its first user. - packages/system/capi-providers-cpprovider/Makefile: add `$(call oci-output,cluster-api-control-plane-provider-kamaji)` (archive base name equals the OCIR repo the privileged push keys on) and drop the inline cache under export (`--cache-to type=inline` gated off). - .github/workflows/pull-requests.yaml: wrap the `E2E Tests` check-run creation in try/catch. On error, `core.setFailed` so the required merge gate fails loudly and fail-closed instead of silently succeeding. Repo-wide audit of every `docker buildx build` reachable from the root `build:` matrix confirms capi was the only recipe bypassing both `image-tags` and `oci-output`. Assisted-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
1 parent
e0ac2f9e12
commit
76c8f890fa
3 files changed
+41
-19
No files matched your search
@@ -917,13 +917,21 @@ jobs:
|
||||
conclusion = 'failure';
|
||||
summary = `in-tree e2e did not pass (result: ${E2E_RESULT})`;
|
||||
}
|
||||
await github.rest.checks.create({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: 'E2E Tests',
|
||||
head_sha: HEAD_SHA,
|
||||
status: 'completed',
|
||||
conclusion,
|
||||
output: { title: 'E2E Tests', summary },
|
||||
});
|
||||
try {
|
||||
await github.rest.checks.create({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: 'E2E Tests',
|
||||
head_sha: HEAD_SHA,
|
||||
status: 'completed',
|
||||
conclusion,
|
||||
output: { title: 'E2E Tests', summary },
|
||||
});
|
||||
} catch (err) {
|
||||
// The 'E2E Tests' check-run is the required merge gate. If we
|
||||
// cannot publish it, fail loudly and fail-closed: setFailed keeps
|
||||
// the job (and thus the gate) red so the PR stays non-mergeable.
|
||||
core.setFailed(`Failed to report E2E Tests check-run: ${err}`);
|
||||
return;
|
||||
}
|
||||
core.info(`E2E Tests → ${conclusion}: ${summary}`);
|
||||
Reference in new issue
Block a user