Skip to content

Commit

Permalink
[release-v2.8] Fix validations script to loop over all required annot…
Browse files Browse the repository at this point in the history
…ations (#3697)

Co-authored-by: Venkata Krishna Rohit Sakala <rohitsakala@gmail.com>
  • Loading branch information
lucasmlp and rohitsakala committed Mar 26, 2024
1 parent 3d0b4f0 commit 81ab710
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/release-validation/validate-annotations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git fetch ${UPSTREAM_REMOTE}

# may need to use parenthesis instead of double quotes in some systems for it to work as an array
# requiredAnnotations="catalog.cattle.io/rancher-version catalog.cattle.io/kube-version catalog.cattle.io/permits-os"
requiredAnnotations=(catalog.cattle.io/rancher-version catalog.cattle.io/kube-version catalog.cattle.io/permits-os)
declare -a requiredAnnotations=(catalog.cattle.io/rancher-version catalog.cattle.io/kube-version catalog.cattle.io/permits-os)

for asset in $(find $ASSETS_DIR -mindepth 2 -maxdepth 2 -name "*.tgz" | sort | xargs); do
if printf '%s\n' "${exclude[@]}" | grep -F -x ${asset} 1>/dev/null; then
Expand Down Expand Up @@ -62,7 +62,7 @@ for asset in $(find $ASSETS_DIR -mindepth 2 -maxdepth 2 -name "*.tgz" | sort | x
if [[ ${key} != "annotations" ]]; then
continue
fi
for requiredAnnotation in $requiredAnnotations; do
for requiredAnnotation in "${requiredAnnotations[@]}"; do
if echo ${chartContent} | grep "catalog.cattle.io/hidden" 1>/dev/null; then
echo "Skipping checking annotation on chart with hidden annotation ${chart}"
break
Expand Down

0 comments on commit 81ab710

Please sign in to comment.