X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fdocker-build.sh;h=e77305869134b3cd55eebdfeec2f80a05255ff2d;hb=refs%2Ftags%2Fv0.38.1;hp=982a61f59d9d5b96ca09e9b52ce04a1ac3e62cad;hpb=5113d3c9d84c3e4237e3c2fa0f616bdfcb2a6d15;p=releng%2Fglobal-jjb.git diff --git a/shell/docker-build.sh b/shell/docker-build.sh index 982a61f5..e7730586 100644 --- a/shell/docker-build.sh +++ b/shell/docker-build.sh @@ -12,8 +12,10 @@ echo "---> docker-build.sh" # Docker image build script set -eu -o pipefail - +echo "---> Building image: $CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG" cd "$DOCKER_ROOT" -# DOCKER_IMAGE variable gets constructed after lf-docker-get-container-tag builder step +# DOCKER_IMAGE_TAG variable gets constructed after lf-docker-get-container-tag builder step # is executed. It constructs the image name and the appropriate tag in the same varaiable. -docker build "$DOCKER_ARGS" . -t "$DOCKER_IMAGE" | tee "$WORKSPACE/docker_build_log.txt" +docker_build_command="docker build ${DOCKER_ARGS:-} -t "$CONTAINER_PUSH_REGISTRY/$DOCKER_NAME:$DOCKER_IMAGE_TAG" ." +echo $docker_build_command +eval $docker_build_command | tee "$WORKSPACE/docker_build_log.txt"