From a7c81da6b85cf8592cf0cf1a141ce007327cffe1 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 24 Mar 2022 19:54:58 +0100 Subject: [PATCH] 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 --- .circleci/config.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 49967c09cea..4aca316f1ad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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