From 189b4e488e6864e1c94e61c4a7131a0d059035d5 Mon Sep 17 00:00:00 2001 From: Graeme Watt Date: Tue, 3 Mar 2020 15:47:19 +0000 Subject: [PATCH] Try to fix push to DockerHub by extracting commands to a separate script * https://docs.travis-ci.com/user/docker/#branch-based-registry-pushes Signed-off-by: Graeme Watt --- .travis.yml | 5 +---- docker_push | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 docker_push diff --git a/.travis.yml b/.travis.yml index eb10e5f..5160ad2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,10 +27,7 @@ script: deploy: skip_cleanup: true provider: script - script: TAG_NAME="${TRAVIS_TAG:-latest}" && \ - docker tag $IMAGE_NAME $IMAGE_NAME_REMOTE:$TAG_NAME && \ - "docker login --password=$DOCKER_PASSWORD --username=$DOCKER_USERNAME" && \ - docker push $IMAGE_NAME_REMOTE:$TAG_NAME + script: bash docker_push on: repo: HEPData/hepdata-converter-docker all_branches: true diff --git a/docker_push b/docker_push new file mode 100644 index 0000000..f120c33 --- /dev/null +++ b/docker_push @@ -0,0 +1,5 @@ +#!/bin/bash +TAG_NAME="${TRAVIS_TAG:-latest}" +docker tag $IMAGE_NAME $IMAGE_NAME_REMOTE:$TAG_NAME +echo "$DOCKER_PASSWORD" | docker login --username=$DOCKER_USERNAME --password-stdin +docker push $IMAGE_NAME_REMOTE:$TAG_NAME \ No newline at end of file