fix(docker-build): push build-index as outputs.json/bake-metadata.json (deploy contract)#5
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Harbor build-index step pushes its blobs as
build-index.json+bake.json, but the consumer (k8s-apps-configupdate-app-manifest.sh) gates onoutputs.json:orasuses the filename as the blob title, so a GitHub-built index lands asbuild-index.json- invisible to the deploy step, which then falls back to the retired Artifactory and 404s. The Bitbucketdocker-build-pipealready pushesoutputs.json/bake-metadata.json, which is why Bitbucket-built apps (e.g. trapsim-web) deploy fine and this only bites GitHub-built ones.Change
cpthe two files to the contract names right before the push (leavingbuild-index.json/bake.jsonin place - still used as the GH artifact + the attach-loop scratch), and pushoutputs.json+bake-metadata.json.The index content already matches the consumer schema (
.outputs[]withtarget/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_USERNAMEneeding to be an org variable, andk8s-deploynot passingimage_project) - all because the github-workflows -> Harbor -> k8s-apps-config chain had not been run end-to-end.