From 846b64d93a996ffe411e8afda37c1927e82c3d6a Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Fri, 3 Apr 2020 15:38:23 -0400 Subject: [PATCH 1/2] Skips cleanup in deploy step --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d562005c..33034aa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ after_success: deploy: provider: script script: bash deploy.sh + skip_cleanup: true on: branch: master From 07551ed4a805bad1ab6ac8a5491fa4c9e99f81d9 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Fri, 3 Apr 2020 15:53:24 -0400 Subject: [PATCH 2/2] Moves AWS CLI install step into deploy script --- .travis.yml | 4 ---- deploy.sh | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33034aa5..81d08281 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,10 +27,6 @@ script: - coverage xml -i - sonar-scanner -after_success: - - pip install --user awscli - - export PATH=$PATH:$HOME/.local/bin - deploy: provider: script script: bash deploy.sh diff --git a/deploy.sh b/deploy.sh index c8c8be21..09756945 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,5 +1,9 @@ #!/bin/bash +# Install AWS CLI +pip install --user awscli; +export PATH=$PATH:$HOME/.local/bin; + # Build and push Docker image to Docker Hub echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin docker build --no-cache -t sartography/cr-connect-backend:latest . || exit 1;