File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Deploy to all racks in sequence: staging -> eu -> us
5+ # Usage: ./scripts/deploy_all.sh
6+
7+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
8+ RACKS=(" staging" " eu" " us" )
9+
10+ echo " === Deploying rack-gateway to all racks ==="
11+ echo " Order: ${RACKS[*]} "
12+ echo " "
13+
14+ for rack in " ${RACKS[@]} " ; do
15+ echo " ========================================"
16+ echo " Deploying to: $rack "
17+ echo " ========================================"
18+ echo " "
19+
20+ if ! " $SCRIPT_DIR /deploy.sh" " $rack " ; then
21+ echo " "
22+ echo " Error: Deployment to $rack failed"
23+ exit 1
24+ fi
25+
26+ echo " "
27+ echo " ✓ $rack deployment complete"
28+ echo " "
29+ done
30+
31+ echo " ========================================"
32+ echo " ✓ All deployments complete!"
33+ echo " Racks: ${RACKS[*]} "
34+ echo " ========================================"
You can’t perform that action at this time.
0 commit comments