Skip to content

Commit

Permalink
Use annotation package name for static check
Browse files Browse the repository at this point in the history
The static check of marketplace bundles previously relied on a
annotation package name. When the check was converted to a stati test
suite a package name from csv was used instead.

This commit fixes a check and use a package name from annotations again.

JIRA: ISV-4524

Signed-off-by: Ales Raszka <[email protected]>
  • Loading branch information
Allda committed Feb 2, 2024
1 parent 13f9039 commit c14b3c9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ def check_marketplace_annotation(bundle: Bundle) -> Iterator[CheckResult]:
if organization != "redhat-marketplace":
return

annotation_package = bundle.annotations.get(
"operators.operatorframework.io.bundle.package.v1"
)

csv_annotations = bundle.csv.get("metadata", {}).get("annotations", {})
expected_remote_workflow = (
"https://marketplace.redhat.com/en-us/operators/"
f"{bundle.csv_operator_name}/pricing?utm_source=openshift_console"
f"{annotation_package}/pricing?utm_source=openshift_console"
)
expected_support_workflow = (
"https://marketplace.redhat.com/en-us/operators/"
f"{bundle.csv_operator_name}/support?utm_source=openshift_console"
f"{annotation_package}/support?utm_source=openshift_console"
)

remote_workflow = csv_annotations.get("marketplace.openshift.io/remote-workflow")
Expand Down

0 comments on commit c14b3c9

Please sign in to comment.