diff --git a/.travis.yml b/.travis.yml index 3efb63ec..7b74e677 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,12 @@ deploy: script: bash deploy.sh skip_cleanup: true on: - branch: master OR production-docker + branch: production-docker + - provider: script + script: bash deploy.sh + skip_cleanup: true + on: + branch: master env: global: diff --git a/deploy.sh b/deploy.sh index e15651c0..193d0cdd 100644 --- a/deploy.sh +++ b/deploy.sh @@ -5,7 +5,9 @@ set -e docker-compose build --no-cache docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$TRAVIS_COMMIT +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