Last active
November 24, 2018 18:39
-
-
Save dalmarcogd/7c7d4d79831fa49f4e61f860b5df8ef5 to your computer and use it in GitHub Desktop.
Build in GKE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [$1 == ""] | |
then | |
echo "<APP> required!" | |
echo "deploy.sh <APP> <VERSION>" | |
exit | |
fi | |
if [$2 == ""] | |
then | |
echo "<VERSION> required!" | |
cho "deploy.sh <APP> <VERSION>" | |
exit | |
fi | |
cd ./$1 | |
git fetch | |
git checkout develop | |
git pull origin develop | |
# Config PROJECT_ID | |
export PROJECT_ID="$(gcloud config get-value project -q)" | |
# Build Image | |
docker build -t gcr.io/${PROJECT_ID}/$1:$2 . | |
docker push gcr.io/${PROJECT_ID}/$1:$2 | |
kubectl create -f deploy-$1-web.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment