ci: improve stability of windows bazel CI job (#45431)

Improves stability of the Windows Bazel CI job by
installing Bazelisk globally.

Also makes the environment helpers more convenient by
evaluating the variable assignments directly, simplifying
some Bash logic.

PR Close #45431
This commit is contained in:
Paul Gschwendtner
2022-03-24 20:23:53 +01:00
committed by Dylan Hunn
parent a7c81da6b8
commit fed76306d9
4 changed files with 18 additions and 11 deletions
+6
View File
@@ -9,3 +9,9 @@ openssl aes-256-cbc -d -in "${PROJECT_ROOT}/.circleci/gcp_token" \
# Set bazel configuration for CircleCI runs.
####################################################################################################
cp "${PROJECT_ROOT}/.circleci/bazel.windows.rc" "${USERPROFILE}/.bazelrc";
# Expose the Bazelisk version. We need to run Bazelisk globally since Windows has problems launching
# Bazel from a node modules directoy that might be modified by the Bazel Yarn install then.
setPublicVar BAZELISK_VERSION \
"$(cd ${PROJECT_ROOT}; node -p 'require("./package.json").devDependencies["@bazel/bazelisk"]')"