k8s-deployment/scripts/lint_all_envs.sh

21 lines
506 B
Bash
Raw Normal View History

2024-10-30 12:35:38 +00:00
#!/usr/bin/env bash
if ! [ -z $DISABLE_ADDITIONAL_CHECKS ]; then
echo "Check is disabled"
exit 0
fi
# -- Get all the envs from the current helmfile installation
ENVS=$(yq '.environments | keys | .[]' ./common/environments.yaml)
FAILED_LINTERS=""
for ENV in $ENVS; do
if ! helmfile -e $ENV lint; then FAILED_LINTERS="$ENV\n$FAILED_LINTERS"; fi
done
if ! [ -z $FAILED_LINTERS ]; then
printf "\n\nSome env can't pass the linter:\n $FAILED_LINTERS"
exit 1
fi
echo "The linter is happy"