Skip to content

Commit

Permalink
Fix: FBC support in cert-project-check task
Browse files Browse the repository at this point in the history
The task that checks a cert project didn't support the FBC catalog
workflow. This commit adds the support and the task parses the cert
project from ci.yaml even though only the catalog change is submitted.

JIRA: ISV-5114

Signed-off-by: Ales Raszka <[email protected]>
  • Loading branch information
Allda committed Aug 5, 2024
1 parent 8468b9c commit f399713
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ spec:
value: "$(params.pipeline_image)"
- name: bundle_path
value: "$(tasks.detect-changes.results.bundle_path)"
- name: catalog_operator_path
value: "$(tasks.detect-changes.results.affected_catalog_operators)"
- name: cert_project_required
value: "$(params.cert_project_required)"
workspaces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ spec:
value: "$(params.pipeline_image)"
- name: bundle_path
value: "$(tasks.detect-changes.results.bundle_path)"
- name: catalog_operator_path
value: "$(tasks.detect-changes.results.affected_catalog_operators)"
- name: cert_project_required
value: "$(params.cert_project_required)"
workspaces:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ spec:
- name: pipeline_image
- name: bundle_path
description: path indicating the location of the certified bundle within the repository
- name: catalog_operator_path
description: path indicating the location of the catalog operator within the repository
default: ""
- name: cert_project_required
description: A flag determines whether a cert project ID needs to be present
default: "true"
Expand All @@ -30,8 +33,15 @@ spec:
echo -n "" | tee $(results.certification_project_id.path)
exit 0
fi
PKG_PATH=$(dirname $(realpath $(params.bundle_path)))
if [ "$(params.bundle_path)" != "" ]; then
PKG_PATH=$(dirname $(realpath $(params.bundle_path)))
elif [ "$(params.catalog_operator_path)" != "" ]; then
OPERATOR_NAME=$(echo $(params.catalog_operator_path) | cut -d ',' -f 1 | cut -d '/' -f 2)
PKG_PATH=operators/$OPERATOR_NAME
else
echo "Bundle path is missing."
exit 1
fi
CI_FILE_PATH="$PKG_PATH/ci.yaml"
Expand Down

0 comments on commit f399713

Please sign in to comment.