Created
November 23, 2016 17:27
-
-
Save ken5scal/42c876ef485a73daeea74d35897eb20d to your computer and use it in GitHub Desktop.
GKE Registryアップロードのshell script
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
#!/bin/bash | |
sudo /opt/google-cloud-sdk/bin/gcloud docker push asia.gcr.io/${PROJECT_NAME}/${CONTAINER_NAME}:latest | |
if [[ "$CIRCLE_TAG" =~ v[0-9]+(\.[0-9]+)* ]]; then | |
docker tag asia.gcr.io/${PROJECT_NAME}/${CONTAINER_NAME}:$CIRCLE_SHA1 asia.gcr.io/${PROJECT_NAME}/${CONTAINER_NAME}:${CIRCLE_TAG} | |
sudo /opt/google-cloud-sdk/bin/gcloud docker push asia.gcr.io/${PROJECT_NAME}/${CONTAINER_NAME}:$CIRCLE_TAG | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment