From 02d1633441dc9543ae69045bc19ac67f8ee4fcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Thu, 24 Jun 2021 08:46:43 +0200 Subject: [PATCH] [Travis] Added logging into Docker Hub (#661) --- .travis.yml | 2 ++ bin/.travis/trusty/setup_from_external_repo.sh | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 592d0a597e..91bbe485a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,8 @@ before_install: ./bin/.travis/trusty/update_docker.sh before_script: # Internal auth token dedicated to testing with travis+composer on ezsystems repos, not for reuse! - echo "{\"github-oauth\":{\"github.com\":\"d0285ed5c8644f30547572ead2ed897431c1fc09\"}}" > auth.json + # Login into Docker Hub to access Travis Docker images cache + - if [[ -n "${DOCKER_PASSWORD}" ]]; then echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin; fi # In case of dev mode we'll need to install composer packages first - docker-compose -f doc/docker/install.yml up --abort-on-container-exit # Run (start containers and execute install command) diff --git a/bin/.travis/trusty/setup_from_external_repo.sh b/bin/.travis/trusty/setup_from_external_repo.sh index 949f793990..5ac77eda63 100755 --- a/bin/.travis/trusty/setup_from_external_repo.sh +++ b/bin/.travis/trusty/setup_from_external_repo.sh @@ -29,6 +29,11 @@ if [ "$COMPOSE_FILE" = "" ] ; then exit 1 fi +if [[ -n "${DOCKER_PASSWORD}" ]]; then + echo "> Set up Docker credentials" + echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin +fi + echo "> Move '$REPO_DIR' to 'tmp_travis_folder'" mv $REPO_DIR tmp_travis_folder ls -al tmp_travis_folder