Files
feedc0de ea50a260fa
Validate, publish, and deploy Brave Sync / validate (push) Failing after 15s
Validate, publish, and deploy Brave Sync / image (push) Skipped
Validate, publish, and deploy Brave Sync / chart (push) Skipped
Validate, publish, and deploy Brave Sync / deploy (push) Skipped
Initial commit with the existing deployment files
2026-10-09 11:39:38 +02:00

25 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
image_tag=${IMAGE_TAG:?Set IMAGE_TAG to the immutable published image tag}
[[ "$(kubectl config current-context)" == kubernetes-admin@kubernetes ]] || {
echo "Expected homelab context kubernetes-admin@kubernetes" >&2
exit 1
}
"${project_dir}/test.sh"
workdir=$(mktemp --directory)
trap 'rm -rf -- "${workdir}"' EXIT
package=$("${project_dir}/package.sh" "${workdir}" "${image_tag}")
helm template brave-sync "${package}" --namespace brave-sync > "${workdir}/rendered.yaml"
kubectl apply --dry-run=server --filename "${project_dir}/namespace.yaml"
kubectl apply --filename "${project_dir}/namespace.yaml"
kubectl apply --dry-run=server --filename "${workdir}/rendered.yaml"
helm upgrade --install brave-sync "${package}" --namespace brave-sync \
--wait --timeout 10m --history-max 5
kubectl --namespace brave-sync rollout status statefulset/brave-sync-dynamodb --timeout=5m
kubectl --namespace brave-sync rollout status deployment/brave-sync-valkey --timeout=5m
kubectl --namespace brave-sync rollout status deployment/brave-sync --timeout=5m
kubectl --namespace brave-sync get pods,ingress,pvc