From 2107b8880f94ce2ce470fc2fdb963fb656ed4520 Mon Sep 17 00:00:00 2001 From: Raimondo Castino <60641726+raicastino@users.noreply.github.com> Date: Wed, 1 Apr 2020 00:58:29 +0200 Subject: [PATCH] [pipeline] add variable CACHE_VERSION_ID This change is required: - to invalidate yarn cache by changing the value of CACHE_VERSION_ID variable - to remove cross OS caching that cause problems with danger. --- azure-templates/make-build-steps.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/azure-templates/make-build-steps.yml b/azure-templates/make-build-steps.yml index 6b7dee07..de224361 100644 --- a/azure-templates/make-build-steps.yml +++ b/azure-templates/make-build-steps.yml @@ -8,6 +8,10 @@ parameters: values: - install_dependencies - build + + - name: 'cache_version_id' + type: string + default: $(CACHE_VERSION_ID) steps: - checkout: self @@ -16,12 +20,11 @@ steps: - task: Cache@2 inputs: - key: 'yarn | "$(Agent.OS)" | yarn.lock' + key: 'yarn-${{ parameters.cache_version_id }} | "$(Agent.OS)" | yarn.lock' restoreKeys: | - yarn | "$(Agent.OS)" - yarn + yarn-${{ parameters.cache_version_id }} | "$(Agent.OS)" path: $(YARN_CACHE_FOLDER) - displayName: Cache yarn packages + displayName: 'Cache yarn packages' - task: UseNode@1 inputs: