From adebaaba450c4e804f528be14309d2b05f0ffdfd Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 20 Jun 2018 11:29:13 -0700 Subject: [PATCH] try pushing images to docker hub --- .travis.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b5f0b62..b6f50836 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,16 @@ script: - docker-compose exec -T app npm run test --verbose after_success: +# eventually wrap this in a if branch is master - docker-compose stop -- docker-compose build --no-cache \ No newline at end of file +- docker-compose build --no-cache +- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" +- docker tag docker tag $APP_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$APP_IMAGE_NAME\_$TRAVIS_BUILD_ID +- docker tag docker tag $NGINX_IMAGE_NAME $DOCKER_USERNAME/$DOCKER_REPOSITORY:$NGINX_IMAGE_NAME\_$TRAVIS_BUILD_ID +- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$APP_IMAGE_NAME\_$TRAVIS_BUILD_ID +- docker push $DOCKER_USERNAME/$DOCKER_REPOSITORY:$NGINX_IMAGE_NAME\_$TRAVIS_BUILD_ID + +env: + global: + - APP_IMAGE_NAME=p5js-web-editor_app + - NGINX_IMAGE_NAME=p5js-web-editor_nginx \ No newline at end of file