-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
17 lines (14 loc) · 960 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Apply 2 tags (latest and SHA) to images for commit being pulled by Travis CI
docker build -t josec0609/multi-client:latest -t josec0609/multi-client:$GIT_SHA -f ./client/Dockerfile ./client
docker build -t josec0609/multi-server:latest -t josec0609/multi-server:$GIT_SHA -f ./server/Dockerfile ./server
docker build -t josec0609/multi-worker:latest -t josec0609/multi-worker:$GIT_SHA -f ./worker/Dockerfile ./worker
docker push josec0609/multi-client:latest
docker push josec0609/multi-server:latest
docker push josec0609/multi-worker:latest
docker push josec0609/multi-client:$GIT_SHA
docker push josec0609/multi-server:$GIT_SHA
docker push josec0609/multi-worker:$GIT_SHA
kubectl apply -f k8s
kubectl set image deployments/client-deployment client=josec0609/multi-client:$GIT_SHA
kubectl set image deployments/server-deployment server=josec0609/multi-server:$GIT_SHA
kubectl set image deployments/worker-deployment worker=josec0609/multi-worker:$GIT_SHA