Skip to content

generate bundle: reference scorecard config when using --input-dir - #7147

Open
cvas22 wants to merge 1 commit into
operator-framework:masterfrom
cvas22:fix/7144-bundle-scorecard-input-dir
Open

cvas22 wants to merge 1 commit into
operator-framework:masterfrom
cvas22:fix/7144-bundle-scorecard-input-dir

Conversation

@cvas22

@cvas22 cvas22 commented Oct 21, 2026

Copy link
Copy Markdown

generate bundle --input-dir writes the scorecard config to the output directory, but the metadata step checked the input directory for it. So bundle.Dockerfile and annotations.yaml were generated without the scorecard labels and the COPY .../tests/scorecard line, and operator-sdk scorecard <bundle-image> could not find the config.

The check now looks in both the input and output directories (new hasScorecardConfig helper). Piped stdin and the default flow are unchanged.

Tested with go test ./internal/cmd/operator-sdk/generate/bundle/ (new unit test for the helper). I did not run the full end-to-end generate bundle flow or the e2e suite. Added a changelog fragment.

Fixes #7144

The scorecard config is written to the output directory, but the bundle
metadata step looked for it in the input directory when --input-dir was
set. As a result bundle.Dockerfile and annotations.yaml lacked the
scorecard labels and COPY line. Check both directories.

Fixes operator-framework#7144

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
@openshift-ci
openshift-ci Bot requested review from anik120 and jberkhahn October 21, 2026 23:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] generate bundle: scorecard config missing from bundle.Dockerfile

1 participant