ci: dedupe top-level yarn install in circleci config (#45431)

Dedupes the Yarn run steps, avoiding the need to manually keep
this step in sync (e.g. with the timeout -- which is currently missing
for the windows job)

PR Close #45431
This commit is contained in:
Paul Gschwendtner
2022-03-24 19:54:58 +01:00
committed by Dylan Hunn
parent 9e3e970dbf
commit a7c81da6b8
+11 -6
View File
@@ -185,6 +185,15 @@ commands:
# snapshot stamping would have the `-with-local-changes` suffix.
command: date +%Y-%m > month.txt
yarn_install:
description: Install dependencies
steps:
- run:
name: Running Yarn install
command: yarn install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
# Yarn's requests sometimes take more than 10mins to complete (especially on Windows).
no_output_timeout: 45m
notify_webhook_on_fail:
description: Notify a webhook about failure
parameters:
@@ -227,11 +236,7 @@ jobs:
keys:
- *cache_key
- *cache_key_fallback
- run:
name: Running Yarn install
command: yarn install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
# Yarn's requests sometimes take more than 10mins to complete.
no_output_timeout: 45m
- yarn_install
- run: yarn --cwd aio install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
# Make the bazel directories and add a file to them if they don't exist already so that
# persist_to_workspace does not fail.
@@ -710,7 +715,7 @@ jobs:
- *cache_key_win
- *cache_key_win_fallback
- run: yarn install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
- yarn_install
- run:
name: Build all windows CI targets