2018-08-27 23:30:34 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
docker-compose build --no-cache
|
|
|
|
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
2020-05-21 23:43:58 +02:00
|
|
|
docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_TAG
|
2018-08-27 23:38:59 +02:00
|
|
|
docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
2020-05-21 23:43:58 +02:00
|
|
|
docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_TAG
|
2018-08-27 23:38:59 +02:00
|
|
|
docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:latest
|
2018-08-27 23:30:34 +02:00
|
|
|
|
2018-08-28 00:54:18 +02:00
|
|
|
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
|
2018-08-27 23:30:34 +02:00
|
|
|
|
2018-08-28 00:54:18 +02:00
|
|
|
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
|
2018-08-27 23:30:34 +02:00
|
|
|
|
2018-08-28 00:54:18 +02:00
|
|
|
kubectl config view
|
|
|
|
kubectl config current-context
|
2018-08-27 23:30:34 +02:00
|
|
|
|
2020-05-26 20:56:25 +02:00
|
|
|
kubectl set image deployment/${KUBE_DEPLOYMENT_NAME} ${KUBE_DEPLOYMENT_CONTAINER_NAME}=index.docker.io/$DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_TAG
|