Skip to content

Commit f399713

Browse files
committed
Fix: FBC support in cert-project-check task
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]>
1 parent 8468b9c commit f399713

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-hosted-pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ spec:
489489
value: "$(params.pipeline_image)"
490490
- name: bundle_path
491491
value: "$(tasks.detect-changes.results.bundle_path)"
492+
- name: catalog_operator_path
493+
value: "$(tasks.detect-changes.results.affected_catalog_operators)"
492494
- name: cert_project_required
493495
value: "$(params.cert_project_required)"
494496
workspaces:

ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-release-pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ spec:
263263
value: "$(params.pipeline_image)"
264264
- name: bundle_path
265265
value: "$(tasks.detect-changes.results.bundle_path)"
266+
- name: catalog_operator_path
267+
value: "$(tasks.detect-changes.results.affected_catalog_operators)"
266268
- name: cert_project_required
267269
value: "$(params.cert_project_required)"
268270
workspaces:

ansible/roles/operator-pipeline/templates/openshift/tasks/cert-project-check.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ spec:
88
- name: pipeline_image
99
- name: bundle_path
1010
description: path indicating the location of the certified bundle within the repository
11+
- name: catalog_operator_path
12+
description: path indicating the location of the catalog operator within the repository
13+
default: ""
1114
- name: cert_project_required
1215
description: A flag determines whether a cert project ID needs to be present
1316
default: "true"
@@ -30,8 +33,15 @@ spec:
3033
echo -n "" | tee $(results.certification_project_id.path)
3134
exit 0
3235
fi
33-
34-
PKG_PATH=$(dirname $(realpath $(params.bundle_path)))
36+
if [ "$(params.bundle_path)" != "" ]; then
37+
PKG_PATH=$(dirname $(realpath $(params.bundle_path)))
38+
elif [ "$(params.catalog_operator_path)" != "" ]; then
39+
OPERATOR_NAME=$(echo $(params.catalog_operator_path) | cut -d ',' -f 1 | cut -d '/' -f 2)
40+
PKG_PATH=operators/$OPERATOR_NAME
41+
else
42+
echo "Bundle path is missing."
43+
exit 1
44+
fi
3545
3646
CI_FILE_PATH="$PKG_PATH/ci.yaml"
3747

0 commit comments

Comments
 (0)