From 197f064fd51b9f7a058dea735885f4ed7d16fb1a Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 20 Aug 2020 22:25:50 -0400 Subject: [PATCH] Cache Yarn on Azure --- azure-pipelines.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9f13aae33..16002990d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,6 +14,7 @@ variables: sentryOrg: 'servarr' sentryUrl: 'https://sentry.servarr.com' dotnetVersion: '3.1.401' + yarnCacheFolder: $(Pipeline.Workspace)/.yarn trigger: branches: @@ -139,10 +140,19 @@ stages: - checkout: self submodules: true fetchDepth: 1 + - task: Cache@2 + inputs: + key: 'yarn | "$(osName)" | yarn.lock' + restoreKeys: | + yarn | "$(osName)" + yarn + path: $(yarnCacheFolder) + displayName: Cache Yarn packages - bash: ./build.sh --frontend displayName: Build Radarr Frontend env: FORCE_COLOR: 0 + YARN_CACHE_FOLDER: $(yarnCacheFolder) - publish: $(outputFolder) artifact: '$(osName)Frontend' displayName: Publish Frontend @@ -750,10 +760,19 @@ stages: - checkout: self submodules: true fetchDepth: 1 + - task: Cache@2 + inputs: + key: 'yarn | "$(osName)" | yarn.lock' + restoreKeys: | + yarn | "$(osName)" + yarn + path: $(yarnCacheFolder) + displayName: Cache Yarn packages - bash: ./build.sh --lint displayName: Lint Radarr Frontend env: FORCE_COLOR: 0 + YARN_CACHE_FOLDER: $(yarnCacheFolder) - job: Analyze_Frontend displayName: Frontend