Skip to content

Commit b7c9fcf

Browse files
committed
add short-term deploy.sh
not ready for ci, but stores long commands, helm diff
1 parent df9bf8d commit b7c9fcf

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

deploy.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# TODO: move this to CI, don't make assumptions about local repo checkouts
5+
6+
export KUBECONFIG=$PWD/secrets/ovh-kubeconfig.yaml
7+
nbviewer_chart="../nbviewer/helm-chart/nbviewer"
8+
echo "Is $PWD/../nbviewer up to date?"
9+
helm dep up $nbviewer_chart
10+
11+
upgrade="upgrade nbviewer $nbviewer_chart -f config/nbviewer.yaml -f secrets/config/nbviewer.yaml"
12+
helm diff $upgrade | grep -v '^[[:space:]]'
13+
14+
echo "Deploy these changes? (y|[N]) "
15+
read confirm
16+
17+
if [[ "$confirm" == "y" || "$confirm" == "Y" ]]; then
18+
echo "Upgrading..."
19+
helm $upgrade
20+
else
21+
echo "Cancelled"
22+
exit 1
23+
fi
24+
25+
# watch deployment rollout
26+
kubectl rollout status -w deployment/nbviewer

0 commit comments

Comments
 (0)