Skip to content

Commit 94fb4fc

Browse files
author
mohit
committed
derp
1 parent 7f77156 commit 94fb4fc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

circleci/docker-publish

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ set -e
1313

1414
check_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"}
4844
SHORT_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
5152
check_hub_vars
5253
if [ $ECR_PUSH_ID != "" ]; then
@@ -57,7 +58,7 @@ echo "Building docker image..."
5758
docker build -t $ORG/$REPO:$SHORT_SHA .
5859

5960
echo "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)

0 commit comments

Comments
 (0)