chore: adopt bootstrap tooling mechanism#14
Conversation
Remove checked-in scripts and replace with bootstrap.sh that pulls shared tooling from the catalog-tooling OCI artifact at CI time. Remove the dead platform-contract digest resolution step from the publish workflow. Scripts directory is now gitignored and populated automatically during CI.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4845661c14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
bootstrap.sh
Outdated
| mkdir -p "${TOOLING_DIR}" | ||
|
|
||
| RESOLVED_DIGEST="$(oras resolve "${TOOLING_REF}")" | ||
| PINNED_REF="${TOOLING_REF%%[:@]*}@${RESOLVED_DIGEST}" |
There was a problem hiding this comment.
Strip tag/digest using the last separator
The pinned reference is derived with ${TOOLING_REF%%[:@]*}, which removes from the first : or @ onward, not the tag/digest separator. If OURBOX_CATALOG_TOOLING_REF points to a registry with an explicit port (for example registry.example.com:5000/org/tooling:stable), this produces registry.example.com@sha256:... and oras pull fails, breaking bootstrap in mirrored/private-registry setups. Parse using the last tag/digest delimiter (after the final slash) so refs with ports remain valid.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in the commit just pushed. Changed %%[:@]* to %[:@]* (shortest match) so only the final :tag or @digest suffix is stripped. Registries with explicit ports (e.g. registry.example.com:5000/ns/repo:tag) are now handled correctly.
%[:@]* strips only the final :tag or @digest suffix. The previous %%[:@]* (longest match) would incorrectly strip from the first : or @, breaking registries with explicit port numbers such as registry.example.com:5000/ns/tooling:stable.
Summary
bootstrap.shto pull shared tooling scripts from the catalog-tooling OCI artifact at CI timescripts/— now gitignored and populated by bootstrapResolve platform contract digeststep from publish workflowscripts/and.tooling/to.gitignoreTest plan
scripts/directory does not appear in GitHub file tree after merge