Skip to content

Commit

Permalink
Update printout of validate-manifests.sh (#306)
Browse files Browse the repository at this point in the history
* Update printout of validate-manifests.sh

* update

* update

* test

* fix
  • Loading branch information
devantler authored Aug 21, 2023
1 parent 2ea1451 commit 27697d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/scripts/validate-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ kubeconform_config=("-strict" "-ignore-missing-schemas" "-schema-location" "defa
echo "🔍 INFO - Downloading Flux OpenAPI schemas"
mkdir -p /tmp/flux-crd-schemas/master-standalone-strict
curl -sL https://github.com/fluxcd/flux2/releases/latest/download/crd-schemas.tar.gz | tar zxf - -C /tmp/flux-crd-schemas/master-standalone-strict
echo -e "\n"

echo "🔍 INFO - Validating files"
find . -type f -name '*.yaml' -print0 | while IFS= read -r -d $'\0' file; do
echo "🔍 INFO - Validating $file"
echo "Validating $file"
yq e 'true' "$file" >/dev/null
done
echo -e "\n"

echo "🔍 INFO - Validating clusters"
find ./k8s/clusters -maxdepth 2 -type f -name '*.yaml' -print0 | while IFS= read -r -d $'\0' file; do
Expand All @@ -27,6 +30,7 @@ find ./k8s/clusters -maxdepth 2 -type f -name '*.yaml' -print0 | while IFS= read
exit 1
fi
done
echo -e "\n"

echo "🔍 INFO - Validating kustomize overlays"
find . -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file; do
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/validate-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ env:
SCRIPTS_DIR: ./.github/scripts

on:
pull_request:
push:
branches: [ '*' ]
tags-ignore: [ '*' ]
Expand Down

0 comments on commit 27697d0

Please sign in to comment.