-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:redbox-mint/redbox-portal
- Loading branch information
Showing
5 changed files
with
1,346 additions
and
1,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
Oops, something went wrong.