Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scorecard details gets generated for java plugin in bundle.Dockerfile #5800

Merged
merged 2 commits into from
May 25, 2022
Merged

Scorecard details gets generated for java plugin in bundle.Dockerfile #5800

merged 2 commits into from
May 25, 2022

Conversation

laxmikantbpandhare
Copy link
Member

@laxmikantbpandhare laxmikantbpandhare commented May 24, 2022

Scorecard details got generated for the bundle even if no details were present for the scorecard in the java plugin

Description of the change:
Updated the flag which will check for the scorecard path.

Motivation for the change:
It will verify the path of the scorecard and if present then only it generates its artifacts in bundle.Dockerfile

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Before:

FROM scratch

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=memcached-quarkus-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.20.0+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=quarkus.javaoperatorsdk.io/v1-alpha

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/

# Copy files to locations specified by labels.
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
COPY bundle/tests/scorecard /tests/scorecard/

After these changes,

FROM scratch

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=memcached-quarkus-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.20.0+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=quarkus.javaoperatorsdk.io/v1-alpha

# Copy files to locations specified by labels.
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/

@openshift-ci openshift-ci bot requested review from jberkhahn and theishshah May 24, 2022 20:38
@laxmikantbpandhare
Copy link
Member Author

I tested this with the java plugin and this change is working. I will test this with other plugins too.

@laxmikantbpandhare
Copy link
Member Author

Please refer issue here: operator-framework/java-operator-plugins#85

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approved

That shows ok for me.

WDYT @varshaprasad96 @ryantking

@laxmikantbpandhare
Copy link
Member Author

Also, I tried generating a bundle for go, ansible, and helm chart. Every operator scaffolded scorecard details in the bundle.Dockerfile.

@camilamacedo86
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2022
@jberkhahn jberkhahn merged commit 4b01a1b into operator-framework:master May 25, 2022
everettraven pushed a commit to everettraven/operator-sdk that referenced this pull request Jun 2, 2022
…operator-framework#5800)

* modified for java empty scorecard copy while running bundle

Signed-off-by: laxmikantbpandhare <[email protected]>

* added changelog

Signed-off-by: laxmikantbpandhare <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants