Skip to content

Commit

Permalink
Merge branch 'master' of github.com:redbox-mint/redbox-portal
Browse files Browse the repository at this point in the history
  • Loading branch information
shilob committed Nov 24, 2021
2 parents c5d93c5 + 57b2da6 commit 8892624
Show file tree
Hide file tree
Showing 5 changed files with 1,346 additions and 1,481 deletions.
13 changes: 6 additions & 7 deletions dockerhub_deploy.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
#! /bin/bash
docker login -u $DOCKER_USER -p $DOCKER_PASS
export REPO=qcifengineering/redbox-portal
export TAG=`if [ "$CIRCLE_BRANCH" == "master" ] && [ -z "$1" ]; then echo "latest"; else echo "$CIRCLE_BRANCH"; fi`
if [ ! -z "$CIRCLE_BRANCH" ]; then
export TAG="$CIRCLE_BRANCH";
fi;

if [ -z "$CIRCLE_BRANCH" ]; then
export TAG="$CIRCLE_TAG";
fi;
#if parameter is passed to script, add parameter to tag. Used to produce bcryptjs versions of the app
export TAG=`if [ "$1" != "" ]; then echo "2.0.1-$1"; else echo "2.0.1"; fi`

docker build -f Dockerfile -t $REPO:$CIRCLE_SHA1 .
docker tag $REPO:$CIRCLE_SHA1 $REPO:$TAG
docker tag $REPO:$CIRCLE_SHA1 $REPO:circleci-$CIRCLE_BUILD_NUM
docker push $REPO:$TAG
docker push $REPO:$CIRCLE_SHA1
docker push $REPO:circleci-$CIRCLE_BUILD_NUM
if [ "$CIRCLE_BRANCH" == "master" ]; then
docker tag $REPO:$CIRCLE_SHA1 $REPO:master
docker push $REPO:master
fi

Loading

0 comments on commit 8892624

Please sign in to comment.