Skip to content

Commit

Permalink
use plain http for embedded artifact push (#4525)
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig O'Donnell authored Mar 26, 2024
1 parent cfacc76 commit 1d9a2bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/image/airgap.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ func pushOCIArtifact(opts imagetypes.PushOCIArtifactOptions) error {
Password: opts.Registry.Password,
}),
}
repository.PlainHTTP = true

_, err = oras.Copy(context.TODO(), orasFS, opts.Tag, repository, opts.Tag, oras.DefaultCopyOptions)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/image/airgap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func createTestAirgapBundle(airgapFiles map[string][]byte, dstPath string) error
}

func newMockRegistryServer(pushedArtifacts map[string]string) *httptest.Server {
return httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
blobsRegex := regexp.MustCompile(`/v2/(.+)/blobs/(.*)`)
manifestsRegex := regexp.MustCompile(`/v2/(.+)/manifests/(.*)`)

Expand Down

0 comments on commit 1d9a2bf

Please sign in to comment.