Skip to content

Commit 214abef

Browse files
committed
Generalize manifest copy
Allow arbitrary files to be copied from the manifest directory, not just those that have the .yaml file extension.
1 parent 8aeabe9 commit 214abef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/lib/bundle/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ func GenerateDockerfile(mediaType, manifests, metadata, copyManifestDir, copyMet
344344
fileContent += fmt.Sprintf("LABEL %s=%s\n\n", ChannelDefaultLabel, chanDefault)
345345

346346
// CONTENT
347-
fileContent += fmt.Sprintf("COPY %s %s\n", filepath.Join(relativeManifestDirectory, "/*.yaml"), "/manifests/")
347+
fileContent += fmt.Sprintf("COPY %s %s\n", relativeManifestDirectory, "/manifests/")
348348
fileContent += fmt.Sprintf("COPY %s %s%s\n", filepath.Join(relativeMetadataDirectory, AnnotationsFile), "/metadata/", AnnotationsFile)
349349

350350
return []byte(fileContent), nil

pkg/lib/bundle/generate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func TestGenerateDockerfileFunc(t *testing.T) {
208208
"LABEL operators.operatorframework.io.bundle.package.v1=test4\n"+
209209
"LABEL operators.operatorframework.io.bundle.channels.v1=test5\n"+
210210
"LABEL operators.operatorframework.io.bundle.channel.default.v1=test5\n\n"+
211-
"COPY test2/*.yaml /manifests/\n"+
211+
"COPY test2 /manifests/\n"+
212212
"COPY metadata/annotations.yaml /metadata/annotations.yaml\n", MetadataDir)
213213

214214
content, err := GenerateDockerfile("test1", "test2", MetadataDir, "test2/", "metadata/", "./", "test4", "test5", "")

0 commit comments

Comments
 (0)