From 5bd812ccddc8ed2d99c1dd6d9b7cfc0cd6d3e10e Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Fri, 21 Feb 2020 17:35:26 +0530 Subject: [PATCH] ci: docker login only before building images --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 09c14fdc..fe893af2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,12 @@ services: - docker before_install: - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - sudo apt-get update && sudo apt-get -y install git + - if [ $BUILD != "development"]; then + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + sudo apt-get update && sudo apt-get -y install git + fi - if [ $BUILD == "development" ];then - sudo apt-get -y install docker-compose; + sudo apt-get update && sudo apt-get -y install docker-compose; fi install: