-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy-staging.sh
23 lines (22 loc) · 1.21 KB
/
deploy-staging.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
if ([[ "$TRAVIS_BRANCH" == "master" ]] || [[ "$TRAVIS_BRANCH" == "develop" ]] || [[ ! -z "$TRAVIS_TAG" ]]) && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
docker build -t mihailts/hypecrafter-frontend -f frontend/Dockerfile ./frontend
docker build -t mihailts/hypecrafter-nginx -f nginx/Dockerfile ./nginx
docker build -t mihailts/hypecrafter-shared -f shared/Dockerfile ./shared
docker build -t mihailts/hypecrafter-backend -f backend/Dockerfile ./backend
docker build -t mihailts/hypecrafter-payment -f payment/Dockerfile ./payment
docker build -t mihailts/hypecrafter-notification -f notification/Dockerfile ./notification
docker build -t mihailts/hypecrafter-gateway -f gateway/Dockerfile ./gateway
# Log in to the docker CLI
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
# Take those images and push them to docker hub
docker push mihailts/hypecrafter-frontend
docker push mihailts/hypecrafter-nginx
docker push mihailts/hypecrafter-shared
docker push mihailts/hypecrafter-backend
docker push mihailts/hypecrafter-payment
docker push mihailts/hypecrafter-notification
docker push mihailts/hypecrafter-gateway
else
echo "This branch will not be deployed"
fi