Files
phppgadmin-kubernetes/test.sh
T
feedc0de e42286437d
Validate and deploy phpPgAdmin / Build, test and publish image (push) Failing after 17s
Validate and deploy phpPgAdmin / Validate manifests (push) Successful in 12s
Validate and deploy phpPgAdmin / Deploy to Kubernetes (push) Skipped
Strip sha256 hash
2026-10-14 20:13:53 +02:00

29 lines
793 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
sh -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 -ignore-missing-schemas -summary "${manifest}"
elif command -v docker >/dev/null 2>&1; then
docker run --rm --interactive \
ghcr.io/yannh/kubeconform:v0.7.0 \
-strict -ignore-missing-schemas -summary < "${manifest}"
else
echo "Required command not found: install kubeconform or Docker" >&2
exit 1
fi
}
validate_file "${project_dir}/phppgadmin.yaml"
validate_file "${project_dir}/ci-deployer.yaml"
echo "phpPgAdmin scripts and Kubernetes resources are valid."