Bump bazel version to 4.0.0
Fix Bazelisk build incomptaibility with bazel 4.0.0 and temporarily
un-flip the option: --incompatible_restrict_string_escapes=false.
See also this bazelisk issue: [1] for more background.
[1] https://github.com/bazelbuild/bazelisk/issues/213
Change-Id: I5a4eeccc6d2dd5a80e0e4b43fb9c04a55d316e06
diff --git a/jenkins-docker/slave-bazel-nocache/Dockerfile b/jenkins-docker/slave-bazel-nocache/Dockerfile
index c1a2f24..daab49b 100644
--- a/jenkins-docker/slave-bazel-nocache/Dockerfile
+++ b/jenkins-docker/slave-bazel-nocache/Dockerfile
@@ -22,12 +22,14 @@
buildifier --version'
# Install Bazelisk
+# TODO:(davido) Remove --incompatible_restrict_string_escapes=false, when this is fixed:
+# https://github.com/bazelbuild/bazelisk/issues/213
RUN cd /tmp && \
git clone https://github.com/bazelbuild/bazelisk.git && \
cd bazelisk && \
git checkout v${BAZELISK_VER} && \
rm -f .bazelversion && \
- bazel build --stamp --workspace_status_command=`pwd`/stamp.sh --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //:bazelisk && \
+ bazel build --config=release --incompatible_restrict_string_escapes=false //:bazelisk && \
cp bazel-bin/*/bazelisk /usr/bin && \
rm -rf /tmp/bazelisk
diff --git a/jenkins-docker/slave-bazel-nocache/Makefile b/jenkins-docker/slave-bazel-nocache/Makefile
index 30b09f3..8504915 100644
--- a/jenkins-docker/slave-bazel-nocache/Makefile
+++ b/jenkins-docker/slave-bazel-nocache/Makefile
@@ -2,7 +2,7 @@
NO_CACHE=false
IMAGE=gerritforge/gerrit-ci-slave-bazel:debian-buster-nocache
-BAZEL_VER=3.7.0
+BAZEL_VER=4.0.0
BUILDIFIER_VER=3.5.0
BAZELISK_VER=1.7.4
NODE_VER=10