From 48ad7922655fb3eecbbf2b1e87a47039e0477428 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Thu, 7 May 2020 14:16:17 -0400 Subject: [PATCH 1/4] Prints out some stuff for debugging --- .travis.yml | 4 ---- deploy.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 202264e..495151a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ language: bash services: - docker -env: - global: - - COMMIT=${TRAVIS_COMMIT::8} - install: - sudo pip install --upgrade pip - pip install --user awscli diff --git a/deploy.sh b/deploy.sh index 2d398b8..d3a9911 100644 --- a/deploy.sh +++ b/deploy.sh @@ -5,6 +5,14 @@ echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin APP="db" REPO="sartography/cr-connect-$APP" TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH" ; fi) +COMMIT=${$TRAVIS_COMMIT::8} + +echo "APP = $APP" +echo "REPO = $REPO" +echo "TAG = $TAG" +echo "TRAVIS_COMMIT = $TRAVIS_COMMIT" +echo "COMMIT = $COMMIT" + docker build -f Dockerfile -t "$REPO:$COMMIT" . docker tag "$REPO:$COMMIT" "$REPO:$TAG" docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER" From b6bd7ea5f36450edc59eefcdb89a81d2cbc9f59f Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Thu, 7 May 2020 14:19:51 -0400 Subject: [PATCH 2/4] Deploys on all branches (for troubleshooting) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 495151a..1f7d01d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ deploy: skip_cleanup: true on: all_branches: true - condition: $TRAVIS_BRANCH =~ ^(testing|staging|master)$ +# condition: $TRAVIS_BRANCH =~ ^(testing|staging|master)$ notifications: email: From 0d65e89dcb890e2a820562cbfe072f0ad175ae92 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Thu, 7 May 2020 14:23:58 -0400 Subject: [PATCH 3/4] Fixes commit substring syntax --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index d3a9911..94b9756 100644 --- a/deploy.sh +++ b/deploy.sh @@ -5,7 +5,7 @@ echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin APP="db" REPO="sartography/cr-connect-$APP" TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH" ; fi) -COMMIT=${$TRAVIS_COMMIT::8} +COMMIT=${TRAVIS_COMMIT::8} echo "APP = $APP" echo "REPO = $REPO" From 615b1c9469b0bcaaa1bb471773ef7b92138e52fa Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Thu, 7 May 2020 14:27:50 -0400 Subject: [PATCH 4/4] Cleans up debugging stuff --- .travis.yml | 2 +- deploy.sh | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f7d01d..495151a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ deploy: skip_cleanup: true on: all_branches: true -# condition: $TRAVIS_BRANCH =~ ^(testing|staging|master)$ + condition: $TRAVIS_BRANCH =~ ^(testing|staging|master)$ notifications: email: diff --git a/deploy.sh b/deploy.sh index 94b9756..83f7f0d 100644 --- a/deploy.sh +++ b/deploy.sh @@ -7,12 +7,6 @@ REPO="sartography/cr-connect-$APP" TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH" ; fi) COMMIT=${TRAVIS_COMMIT::8} -echo "APP = $APP" -echo "REPO = $REPO" -echo "TAG = $TAG" -echo "TRAVIS_COMMIT = $TRAVIS_COMMIT" -echo "COMMIT = $COMMIT" - docker build -f Dockerfile -t "$REPO:$COMMIT" . docker tag "$REPO:$COMMIT" "$REPO:$TAG" docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER"