ci: fix rbe initialization failing in windows job (#49142)

The RBE init script from dev-infra is using ES2020 but
the image NodeJS version does not support e.g. nullish coalescing.

PR Close #49142
This commit is contained in:
Paul Gschwendtner 2023-02-20 14:14:46 +00:00
parent 8ba8e0dcff
commit c8be8fa79f

View file

@ -595,22 +595,15 @@ jobs:
executor: windows-executor
steps:
- checkout
- save_month_to_file
- capture_patches_for_cache_key
- init_environment
# Setup the proper NodeJS version. The image comes pre-installed with `nvm-windows`.
# Note: This happens immediately after checkout because environment initialization logic
# might rely on Node and shouldn't use the older image-provided NodeJS version.
- run:
name: Install NodeJS version from `.nvmrc`.
command: |
nvm install $(cat .nvmrc)
nvm use $(cat .nvmrc)
- restore_cache:
keys:
- *cache_key_win
- *cache_key_win_fallback
- run:
name: Debug information for flakiness of Windows job
command: |
@ -621,6 +614,14 @@ jobs:
echo "Path: $PATH"
yarn node -v
- save_month_to_file
- capture_patches_for_cache_key
- init_environment
- restore_cache:
keys:
- *cache_key_win
- *cache_key_win_fallback
# Install project dependencies, and install Bazelisk globally. This is necessary as
# Windows might error when `bazel` is invoked from the project node modules. The Bazel
# invocation might modify the symlinked project `node_modules` again, causing failures.