Skip to content

Commit

Permalink
Rename PUSH to PUBLISH_CONTAINERS for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
rstorey committed Jan 31, 2019
1 parent 169d6b3 commit 521faf7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build_containers.sh
Expand Up @@ -5,7 +5,7 @@ set -eu -o pipefail
BUILD_ALL=${BUILD_ALL:=0}
BUILD_NUMBER=${BUILD_NUMBER:=1}
TAG=${TAG:-test}
PUSH=${PUSH:=1}
PUBLISH_CONTAINERS=${PUBLISH_CONTAINERS:=1}

# Get an unique venv folder to use inside workspace
VENV=".venv-${BUILD_NUMBER}"
Expand All @@ -22,7 +22,7 @@ pipenv install --dev --deploy
FULL_VERSION_NUMBER="$(python3 setup.py --version)"
VERSION_NUMBER=$(echo "${FULL_VERSION_NUMBER}" | cut -d '+' -f 1)

if [ $PUSH -eq 1 ]; then
if [ $PUBLISH_CONTAINERS -eq 1 ]; then
AWS_ACCOUNT_ID="$(aws sts get-caller-identity --output=text --query "Account")"
eval "$(aws ecr get-login --no-include-email --region us-east-1)"
fi
Expand All @@ -31,7 +31,7 @@ python3 setup.py build

docker build -t concordia .

if [ $PUSH -eq 1 ]; then
if [ $PUBLISH_CONTAINERS -eq 1 ]; then
docker tag concordia:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia:${VERSION_NUMBER}"
docker tag concordia:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia:${TAG}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia:${VERSION_NUMBER}"
Expand All @@ -44,7 +44,7 @@ if [ $BUILD_ALL -eq 1 ]; then
docker build -t concordia/celerybeat --file celerybeat/Dockerfile .
docker build -t concordia/indexer --file indexer/Dockerfile .

if [ $PUSH -eq 1 ]; then
if [ $PUBLISH_CONTAINERS -eq 1 ]; then
docker tag concordia/importer:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/importer:${VERSION_NUMBER}"
docker tag concordia/importer:latest "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/importer:${TAG}"
docker push "${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/concordia/importer:${VERSION_NUMBER}"
Expand Down

0 comments on commit 521faf7

Please sign in to comment.