From 16827983e7be98e42ed9f79f5dce1e11ca164e37 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Thu, 16 Mar 2017 22:11:24 +0100 Subject: [PATCH] Adding automatic deployment on Dockerhub --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4e150744..f16e0911 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,13 @@ script: - docker-compose up -d - sleep 5 - ./scripts/check_services.sh + +after_success: + - if [ "$TRAVIS_BRANCH" == "master" ]; then + docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; + docker push USER/REPO; + fi + deploy: provider: npm email: clement.michaud34@gmail.com @@ -28,3 +35,4 @@ notifications: - clement.michaud34@gmail.com on_success: change on_failure: always +