Create WORKSPACE file before running bazel in kubemark

This commit is contained in:
Shyam Jeedigunta 2018-07-09 23:07:03 +02:00
parent 24ee75e265
commit 0d5c430606

View File

@ -194,6 +194,7 @@ function create-and-upload-hollow-node-image {
KUBEMARK_IMAGE_REGISTRY="${KUBEMARK_IMAGE_REGISTRY:-${CONTAINER_REGISTRY}/${PROJECT}}"
if [[ "${KUBEMARK_BAZEL_BUILD:-}" =~ ^[yY]$ ]]; then
# Build+push the image through bazel.
touch WORKSPACE # Needed for bazel.
build_cmd=("bazel" "run" "//cluster/images/kubemark:push" "--define" "REGISTRY=${KUBEMARK_IMAGE_REGISTRY}" "--define" "IMAGE_TAG=${KUBEMARK_IMAGE_TAG}")
run-cmd-with-retries "${build_cmd[@]}"
else