Skip to content

Instantly share code, notes, and snippets.

@dalmarcogd
Last active November 24, 2018 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalmarcogd/7c7d4d79831fa49f4e61f860b5df8ef5 to your computer and use it in GitHub Desktop.
Save dalmarcogd/7c7d4d79831fa49f4e61f860b5df8ef5 to your computer and use it in GitHub Desktop.
Build in GKE
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