Skip to content

Commit d9c2bf8

Browse files
UPSTREAM: <carry>: [DefaultCatalogTests]: Allow to pass auth path for docker credentials"
1 parent caeafc0 commit d9c2bf8

File tree

1 file changed

+5
-0
lines changed
  • openshift/default-catalog-consistency/pkg/extract

1 file changed

+5
-0
lines changed

openshift/default-catalog-consistency/pkg/extract/extract.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ func UnpackImage(ctx context.Context, imageRef, name string) (res *ExtractedImag
6969
OSChoice: "linux",
7070
}
7171

72+
if authPath := os.Getenv("REGISTRY_AUTH_FILE"); authPath != "" {
73+
fmt.Println("Using registry auth file:", authPath)
74+
sysCtx.AuthFilePath = authPath
75+
}
76+
7277
policyCtx, err := loadPolicyContext(sysCtx, imageRef)
7378
if err != nil {
7479
return nil, fmt.Errorf("create policy context: %w", err)

0 commit comments

Comments
 (0)