Deploy achievement-safe Factorio 2.0.77 with strict placement, monitoring and limited CD
Test and deploy Factorio / validate (push) Failing after 12s
Test and deploy Factorio / deploy (push) Skipped

This commit is contained in:
feedc0de committed 2026-10-17 13:50:19 +02:00
commit d1978abb05
29 files changed
+1459

No files matched your search

Executable
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
root=$(cd -- "$(dirname -- "$0")" && pwd)
if [[ ${FACTORIO_CI:-false} != true ]]; then
[[ $(kubectl config current-context) == kubernetes-admin@kubernetes ]] || { echo 'Wrong Kubernetes context' >&2; exit 1; }
fi
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
"$root/render.sh" > "$work/rendered.yaml"
# The reconciler owns live placement. An image/config update must not reset failover.
kubectl -n factorio get deployment factorio --ignore-not-found -o json > "$work/live.json"
python3 "$root/scripts/prepare-deploy.py" "$work/rendered.yaml" "$work/live.json" > "$work/apply.yaml"
kubectl apply --dry-run=server -f "$work/apply.yaml"
kubectl apply -f "$work/apply.yaml"
if ! kubectl -n factorio rollout status deployment/factorio --timeout=1800s; then
kubectl -n factorio get deployment factorio -o yaml
kubectl -n factorio get pods -o wide
kubectl -n factorio get events --sort-by=.lastTimestamp
exit 1
fi