forked from ImparaAI/go-figure-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy
18 lines (14 loc) · 838 Bytes
/
deploy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push imparaai/go-figure-api
docker push imparaai/go-figure-api:dev
openssl aes-256-cbc -K $encrypted_12c8071d2874_key -iv $encrypted_12c8071d2874_iv -in gce-deploy-service-account.json.enc -out gce-deploy-service-account.json -d
if [ ! -d $HOME/google-cloud-sdk/bin ]; then
rm -rf $HOME/google-cloud-sdk;
curl https://sdk.cloud.google.com | bash > /dev/null;
fi
source $HOME/google-cloud-sdk/path.bash.inc
gcloud components update kubectl
gcloud auth activate-service-account --key-file gce-deploy-service-account.json
gcloud container clusters get-credentials go-figure --zone us-central1-a --project imparaai-sergio
kubectl patch deployment api -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"