[release-1.21] fix: host builder can push to OCP internal registry - #3887
[release-1.21] fix: host builder can push to OCP internal registry#3887knative-prow-robot wants to merge 1 commit into
Conversation
OpenShift's internal registry returns HTTP 500 for manifest HEAD requests by digest when the repository doesn't exist yet. Since remote.WriteIndex checks child manifests by digest, the push fails on a fresh repository. Before writing the index, perform a HEAD request by tag. If the registry returns 404, push an empty image to create the repository first. The empty image tag is then overwritten by the index push. Signed-off-by: Matej Vašek <matejvasek@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: knative-prow-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@knative-prow-robot: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
This is an automated cherry-pick of #3885