Skip to content

fix(docker-build): push build-index as outputs.json/bake-metadata.json (deploy contract)#5

Merged
chriswydra merged 1 commit into
mainfrom
fix/harbor-build-index-filenames
Jul 12, 2026
Merged

fix(docker-build): push build-index as outputs.json/bake-metadata.json (deploy contract)#5
chriswydra merged 1 commit into
mainfrom
fix/harbor-build-index-filenames

Conversation

@chriswydra

Copy link
Copy Markdown
Contributor

The Harbor build-index step pushes its blobs as build-index.json + bake.json, but the consumer (k8s-apps-config update-app-manifest.sh) gates on outputs.json:

oras pull ... "$harbor_ref" -o "$harbor_dir" && [[ -f "$harbor_dir/outputs.json" ]]

oras uses the filename as the blob title, so a GitHub-built index lands as build-index.json - invisible to the deploy step, which then falls back to the retired Artifactory and 404s. The Bitbucket docker-build-pipe already pushes outputs.json/bake-metadata.json, which is why Bitbucket-built apps (e.g. trapsim-web) deploy fine and this only bites GitHub-built ones.

Change

cp the two files to the contract names right before the push (leaving build-index.json/bake.json in place - still used as the GH artifact + the attach-loop scratch), and push outputs.json + bake-metadata.json.

The index content already matches the consumer schema (.outputs[] with target/digest); this is purely the filename contract - no schema change.

Why now / test case

metadata-editor (MT-32) is the first GitHub-built app to do a Harbor-only deploy through this consumer, so it is the first to exercise this seam (its build succeeded; only the deploy-step metadata lookup failed). It is the ready-made end-to-end test once merged.

Third DEVENV-9681 GitHub-side loose end found this session (after HARBOR_USERNAME needing to be an org variable, and k8s-deploy not passing image_project) - all because the github-workflows -> Harbor -> k8s-apps-config chain had not been run end-to-end.

The Harbor build-index blobs were pushed as build-index.json/bake.json, but the
k8s-apps-config consumer (update-app-manifest.sh) and the Bitbucket docker-build-pipe
use outputs.json/bake-metadata.json. oras uses the filename as the blob title, so a
GitHub-built index was invisible to the deploy step - it checks for outputs.json,
misses, and falls back to the retired Artifactory (404). Surfaced by the first
GitHub-built Harbor-only deploy (metadata-editor, MT-32). Content already matches
the consumer's schema (.outputs[]); this is purely the filename contract.
@chriswydra
chriswydra merged commit 868fde4 into main Jul 12, 2026
1 check passed
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