This repository has been archived on 2026-10-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2026-09-05 09:35:59 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
|
workdir=$(mktemp -d); trap 'rm -rf "${workdir}"' EXIT
|
|
|
|
|
sh -n "${project_dir}/install.sh"
|
|
|
|
|
bash -n "${project_dir}/render.sh" "${project_dir}/create-ci-kubeconfig.sh" "${project_dir}/test.sh"
|
|
|
|
|
"${project_dir}/render.sh" "${workdir}/argocd.yaml"
|
|
|
|
|
if grep -Eq '^kind: Secret$' "${workdir}/argocd.yaml"; then
|
|
|
|
|
echo "Rendered Argo CD state must not contain Secrets" >&2; exit 1
|
|
|
|
|
fi
|
2026-10-14 20:15:52 +02:00
|
|
|
image=ghcr.io/yannh/kubeconform:v0.7.0
|
2026-09-05 09:35:59 +02:00
|
|
|
validate() { if command -v kubeconform >/dev/null; then kubeconform -strict -exit-on-error -summary "$@"; else local file=${!#}; docker run --rm -i "${image}" -strict -exit-on-error -summary "${@:1:$#-1}" < "$file"; fi; }
|
|
|
|
|
validate -ignore-missing-schemas "${workdir}/argocd.yaml"
|
|
|
|
|
validate "${project_dir}/ci-deployer.yaml"
|
|
|
|
|
echo "Argo CD chart and CI resources are valid."
|