From 976b0999e049bebb40ac7b112e5dc400bbd13a53 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Thu, 7 May 2020 08:45:07 -0400 Subject: [PATCH] Removes build arg --- Dockerfile | 3 --- deploy.sh | 14 +++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30be1c6..4a5c8d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,3 @@ FROM postgres -ARG GIT_COMMIT=unspecified -LABEL git_commit=$GIT_COMMIT COPY ./initdb.sh /docker-entrypoint-initdb.d/initdb.sh -CMD echo 'echo "git commit = $GIT_COMMIT"' >> /docker-entrypoint-initdb.d/initdb.sh EXPOSE 5432 diff --git a/deploy.sh b/deploy.sh index 3feb287..2d398b8 100644 --- a/deploy.sh +++ b/deploy.sh @@ -3,12 +3,12 @@ # Build and push Docker image to Docker Hub 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;) -docker build --build-arg GIT_COMMIT="$REPO:$COMMIT" -f Dockerfile -t "$REPO:$COMMIT" .; -docker tag "$REPO:$COMMIT" "$REPO:$TAG"; -docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER"; -docker push "$REPO"; +REPO="sartography/cr-connect-$APP" +TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH" ; fi) +docker build -f Dockerfile -t "$REPO:$COMMIT" . +docker tag "$REPO:$COMMIT" "$REPO:$TAG" +docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER" +docker push "$REPO" # Wait for Docker Hub echo "Publishing to Docker Hub..." @@ -16,4 +16,4 @@ sleep 30 # Notify UVA DCOS that Docker image has been updated echo "Refreshing DC/OS..." -aws sqs send-message --region "$AWS_DEFAULT_REGION" --queue-url "$AWS_SQS_URL" --message-body "crconnect/$TRAVIS_BRANCH/$APP"; +aws sqs send-message --region "$AWS_DEFAULT_REGION" --queue-url "$AWS_SQS_URL" --message-body "crconnect/$TRAVIS_BRANCH/$APP"