#!/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@sha256:85dbef6b4b312b99133decc9c6fc9495e9fc5f92293d4ff3b7e1b30f5611823c \ -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."