Files
home-assistant-kubernetes/test.sh
T
feedc0de cd34e7413d
Validate and deploy Home Assistant / Validate manifests (push) Successful in 22s
Validate and deploy Home Assistant / Deploy to Kubernetes (push) Successful in 2m37s
Initial commit of my existing home-assistant config files and CI
2026-08-08 22:26:36 +02:00

29 lines
827 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
bash -n "${project_dir}/install.sh"
bash -n "${project_dir}/create-ci-kubeconfig.sh"
validate_file() {
local manifest=$1
if command -v kubeconform >/dev/null 2>&1; then
kubeconform -strict -summary "${manifest}"
elif command -v docker >/dev/null 2>&1; then
docker run --rm --interactive \
ghcr.io/yannh/kubeconform:v0.7.0@sha256:85dbef6b4b312b99133decc9c6fc9495e9fc5f92293d4ff3b7e1b30f5611823c \
-strict -summary < "${manifest}"
else
echo "Required command not found: install kubeconform or Docker" >&2
exit 1
fi
}
validate_file "${project_dir}/home-assistant.yaml"
validate_file "${project_dir}/ci-deployer.yaml"
echo "Home Assistant scripts and Kubernetes resources are valid."