diff --git a/.travis.yml b/.travis.yml index 3a22d3c2..d7f06105 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,6 @@ before_deploy: - source /home/travis/google-cloud-sdk/path.bash.inc - gcloud --quiet version - gcloud --quiet components update - - gcloud --quiet components beta update - gcloud --quiet components update kubectl deploy: diff --git a/deploy.sh b/deploy.sh index 193d0cdd..f79de6bd 100755 --- a/deploy.sh +++ b/deploy.sh @@ -9,22 +9,15 @@ docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_COMMIT docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest -# echo $GCLOUD_SERVICE_KEY_PRD | base64 --decode -i > ${HOME}/gcloud-service-key.json -# gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json +echo $GCLOUD_SERVICE_KEY_PRD | base64 --decode -i > ${HOME}/gcloud-service-key.json +gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json -# gcloud --quiet config set project $PROJECT_NAME_PRD -# gcloud --quiet config set container/cluster $CLUSTER_NAME_PRD -# gcloud --quiet config set compute/zone ${CLOUDSDK_COMPUTE_ZONE} -# gcloud --quiet container clusters get-credentials $CLUSTER_NAME_PRD +gcloud --quiet config set project $PROJECT_NAME_PRD +gcloud --quiet config set container/cluster $CLUSTER_NAME_PRD +gcloud --quiet config set compute/zone ${CLOUDSDK_COMPUTE_ZONE} +gcloud --quiet container clusters get-credentials $CLUSTER_NAME_PRD -# gcloud docker push gcr.io/${PROJECT_NAME_PRD}/${DOCKER_IMAGE_NAME} - -# yes | gcloud beta container images add-tag gcr.io/${PROJECT_NAME_PRD}/${DOCKER_IMAGE_NAME}:$TRAVIS_COMMIT gcr.io/${PROJECT_NAME_PRD}/${DOCKER_IMAGE_NAME}:latest - -# kubectl config view -# kubectl config current-context +kubectl config view +kubectl config current-context # kubectl set image deployment/${KUBE_DEPLOYMENT_NAME} ${KUBE_DEPLOYMENT_CONTAINER_NAME}=gcr.io/${PROJECT_NAME_PRD}/${DOCKER_IMAGE_NAME}:$TRAVIS_COMMIT - -# sleep 30 -# npm run e2e_test \ No newline at end of file