Skip to content

Commit 63327dc

Browse files
authored
[ISV-3413] Community operator github workflow should send only 1 signing request per index version (#434)
Signed-off-by: Maurizio Porrato <[email protected]>
1 parent bcf9af2 commit 63327dc

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

ansible/roles/operator-pipeline/templates/openshift/tasks/verify-whitelisted-index-image.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ spec:
1414
image: "$(params.ubi8_minimal_image)"
1515
script: |
1616
#! /usr/bin/env bash
17-
INDEX_IMAGE="$(cut -d':' -f1 <<< '$(params.reference)')"
18-
echo $INDEX_IMAGE
19-
if [[ $INDEX_IMAGE == "registry.redhat.io/redhat/community-operator-index" ||
20-
$INDEX_IMAGE == "registry.redhat.io/redhat/redhat-marketplace-index" ||
21-
$INDEX_IMAGE == "registry.redhat.io/redhat/certified-operator-index" ]]; then
22-
echo "The index image is white listed."
23-
else
24-
echo "The index image is not white listed."
25-
exit 1
26-
fi
17+
for REFERENCE in $(tr ',' ' ' <<< '$(params.reference)'); do
18+
INDEX_IMAGE="$(cut -d':' -f1 <<< $REFERENCE)"
19+
echo $INDEX_IMAGE
20+
if ! [[ $INDEX_IMAGE == "registry.redhat.io/redhat/community-operator-index" ||
21+
$INDEX_IMAGE == "registry.redhat.io/redhat/redhat-marketplace-index" ||
22+
$INDEX_IMAGE == "registry.redhat.io/redhat/certified-operator-index" ||
23+
$INDEX_IMAGE == "quay.io/community-operators-pipeline/catalog" # Community operators dev
24+
]]; then
25+
echo "The index image is not white listed."
26+
exit 1
27+
fi
28+
done
29+
echo "The index image is white listed."

0 commit comments

Comments
 (0)