Merge pull request #1648 from vmware-tanzu/jtc/do-not-fail-hack-script-without-KUBE_GIT_VERSION
Do not fail hack script without kube git version
This commit is contained in:
commit
fbeb45a1a0
@ -205,13 +205,14 @@ registry_repo_tag="${registry_repo}:${tag}"
|
|||||||
|
|
||||||
if [[ "$do_build" == "yes" ]]; then
|
if [[ "$do_build" == "yes" ]]; then
|
||||||
# Rebuild the code
|
# Rebuild the code
|
||||||
|
testing_version="${KUBE_GIT_VERSION:-}"
|
||||||
if [[ "$dockerfile_path" != "" ]]; then
|
if [[ "$dockerfile_path" != "" ]]; then
|
||||||
log_note "Docker building the app with dockerfile $dockerfile_path and KUBE_GIT_VERSION=$KUBE_GIT_VERSION"
|
log_note "Docker building the app with dockerfile $dockerfile_path and KUBE_GIT_VERSION='$testing_version'"
|
||||||
DOCKER_BUILDKIT=1 docker build . --tag "$registry_repo_tag" --file "$dockerfile_path" --build-arg "KUBE_GIT_VERSION=$KUBE_GIT_VERSION"
|
DOCKER_BUILDKIT=1 docker build . --tag "$registry_repo_tag" --file "$dockerfile_path" --build-arg "KUBE_GIT_VERSION=$testing_version"
|
||||||
else
|
else
|
||||||
log_note "Docker building the app with KUBE_GIT_VERSION=$KUBE_GIT_VERSION"
|
log_note "Docker building the app with KUBE_GIT_VERSION='$testing_version'"
|
||||||
# DOCKER_BUILDKIT=1 is optional on MacOS but required on linux.
|
# DOCKER_BUILDKIT=1 is optional on MacOS but required on linux.
|
||||||
DOCKER_BUILDKIT=1 docker build . --tag "$registry_repo_tag" --build-arg "KUBE_GIT_VERSION=$KUBE_GIT_VERSION"
|
DOCKER_BUILDKIT=1 docker build . --tag "$registry_repo_tag" --build-arg "KUBE_GIT_VERSION=$testing_version"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user