Fix workflow Kubernetes manifest validation
This commit is contained in:
parent
6f121ec945
commit
6cb1b0cdec
|
|
@ -36,11 +36,10 @@ jobs:
|
||||||
|
|
||||||
bash -n lab.sh
|
bash -n lab.sh
|
||||||
|
|
||||||
mapfile -t manifests < <(find apps -type f \( -name '*.yaml' -o -name '*.yml' \) | sort)
|
kubectl --kubeconfig "${KUBECONFIG:-/home/jv/.kube/config}" apply --dry-run=server --recursive -f apps
|
||||||
kubectl --kubeconfig "${KUBECONFIG:-/home/jv/.kube/config}" apply --dry-run=server -f "${manifests[@]}"
|
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
kubectl --kubeconfig "${KUBECONFIG:-/home/jv/.kube/config}" diff -f "${manifests[@]}"
|
kubectl --kubeconfig "${KUBECONFIG:-/home/jv/.kube/config}" diff --recursive -f apps
|
||||||
diff_status="$?"
|
diff_status="$?"
|
||||||
set -e
|
set -e
|
||||||
if (( diff_status > 1 )); then
|
if (( diff_status > 1 )); then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue