File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,9 @@ set -e
1313
1414check_hub_vars () {
1515 # User supplied args
16- DOCKER_USER=$1
1716 if [[ -z $DOCKER_USER ]]; then echo " Missing arg1 DOCKER_USER" && exit 1; fi
18- DOCKER_PASS=$2
1917 if [[ -z $DOCKER_PASS ]]; then echo " Missing arg2 DOCKER_PASS" && exit 1; fi
20- DOCKER_EMAIL=$3
2118 if [[ -z $DOCKER_EMAIL ]]; then echo " Missing arg3 DOCKER_EMAIL" && exit 1; fi
22- ORG=$4
2319 if [[ -z $ORG ]]; then echo " Missing arg4 ORG" && exit 1; fi
2420}
2521
@@ -47,6 +43,11 @@ REPO=$CIRCLE_PROJECT_REPONAME
4743: ${CIRCLE_SHA1?" Missing required env var" }
4844SHORT_SHA=${CIRCLE_SHA1: 0: 7}
4945
46+ DOCKER_USER=$1
47+ DOCKER_PASS=$2
48+ DOCKER_EMAIL=$3
49+ ORG=$4
50+
5051# Check CLI + env vars for DockerHub and (conditonally) ECR
5152check_hub_vars
5253if [ $ECR_PUSH_ID != " " ]; then
@@ -57,7 +58,7 @@ echo "Building docker image..."
5758docker build -t $ORG /$REPO :$SHORT_SHA .
5859
5960echo " Pushing to DockerHub..."
60- push_hub_image
61+ push_hub_image $1 $2 $3 $4
6162
6263# TODO: fail if ECR_PUSH_ID is not set;
6364# all repos eventually should dual publish (or explicitly opt-out)
You can’t perform that action at this time.
0 commit comments