Files
factorio/install.sh
T
feedc0de 1aa4d28a60
Test and deploy Factorio / validate (push) Successful in 30s
Test and deploy Factorio / deploy (push) Successful in 17s
Use simple preferred scheduling for Factorio
2026-10-17 16:34:59 +02:00

19 lines
759 B
Bash
Executable File

#!/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"
python3 "$root/scripts/prepare-deploy.py" "$work/rendered.yaml" > "$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