Skip to content

Commit 75fd49b

Browse files
committed
chore: release script with kubectl rollout restart
1 parent 43e4bf1 commit 75fd49b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

scripts/kubectl/rollout-restart.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -e -x
4+
5+
namespace=prod
6+
kubeconfig=microk8s-local
7+
8+
# Loop through script arguments
9+
while [[ $# -gt 0 ]]; do
10+
case "$1" in
11+
*)
12+
other_args+=("$1")
13+
shift
14+
;;
15+
esac
16+
done
17+
18+
kubectl --kubeconfig ~/.kube/$kubeconfig rollout restart deployments --namespace $namespace "${other_args[@]}"

scripts/release.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -x -e
4+
5+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd )"
6+
cd "$DIR" || exit
7+
8+
# Upgrade infrastructure with Helm
9+
sh ./scripts/helm/upgrade.sh
10+
11+
# Restart deployments with kubectl
12+
sh ./scripts/kubectl/rollout-restart.sh

0 commit comments

Comments
 (0)