aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Adele Zhou <adelez@google.com>2017-07-12 22:32:47 -0700
committerGravatar Adele Zhou <adelez@google.com>2017-07-12 22:32:47 -0700
commite2810d2f53994ca18858cd4eae2e5022681b5da9 (patch)
treefa8a4449a87386b423f40b583ea73d8b4ff9cf66 /tools
parent519318f752a523b407357029ef464e2d04fd855f (diff)
Pull from dockerhub.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_tests/dockerize/build_interop_image.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/run_tests/dockerize/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh
index fa631851b1..61105b0da4 100755
--- a/tools/run_tests/dockerize/build_interop_image.sh
+++ b/tools/run_tests/dockerize/build_interop_image.sh
@@ -67,8 +67,14 @@ else
BASE_IMAGE=${BASE_NAME}_base:`md5 -r tools/dockerfile/interoptest/$BASE_NAME/Dockerfile | cut -f1 -d\ `
fi
-# Make sure base docker image has been built. Should be instantaneous if so.
-docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/interoptest/$BASE_NAME || exit $?
+if [ "$DOCKERHUB_ORGANIZATION" != "" ]
+then
+ DOCKER_IMAGE_NAME=$DOCKERHUB_ORGANIZATION/$BASE_IMAGE
+ docker pull $DOCKER_IMAGE_NAME
+else
+ # Make sure docker image has been built. Should be instantaneous if so.
+ docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/interoptest/$BASE_NAME || exit $?
+fi
# Create a local branch so the child Docker script won't complain
git branch -f jenkins-docker