Browse Source

Merge pull request #13675 from jakesmith/hpcc-23938-incr-pull-image

HPCC-23938 If no local image matching commit, pull image from registry

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 years ago
parent
commit
0471de778a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      dockerfiles/incr.sh

+ 2 - 2
dockerfiles/incr.sh

@@ -62,8 +62,8 @@ if [[ -z "$FORCE" ]] ; then
   # If not found above, look for latest tagged
   # If not found above, look for latest tagged
   if [[ -z ${PREV} ]] ; then
   if [[ -z ${PREV} ]] ; then
     PREV=$(git describe --abbrev=0 --tags)-Debug
     PREV=$(git describe --abbrev=0 --tags)-Debug
-    IMAGE_FOUND=$(docker images ${DOCKER_REPO}/platform-build --format {{.Tag}} | fgrep "$PREV" | head -n 1)
-    if [[ -z "$IMAGE_FOUND" ]] ; then
+    docker pull ${DOCKER_REPO}/platform-build:${PREV}
+    if [ $? -ne 0 ]; then
       echo "Could not locate docker image based on PREV tag: ${PREV} for docker user: ${DOCKER_REPO}"
       echo "Could not locate docker image based on PREV tag: ${PREV} for docker user: ${DOCKER_REPO}"
       exit
       exit
     fi
     fi