Skip to content

Commit 7eec84f

Browse files
authored
[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.
1 parent 4d253b3 commit 7eec84f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

azure-templates/make-build-steps.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,23 @@ parameters:
88
values:
99
- install_dependencies
1010
- build
11-
11+
12+
- name: 'cache_version_id'
13+
type: string
14+
default: $(CACHE_VERSION_ID)
15+
1216
steps:
1317
- checkout: self
1418
persistCredentials: true
1519
displayName: 'Checkout'
1620

1721
- task: Cache@2
1822
inputs:
19-
key: 'yarn | "$(Agent.OS)" | yarn.lock'
23+
key: 'yarn-${{ parameters.cache_version_id }} | "$(Agent.OS)" | yarn.lock'
2024
restoreKeys: |
21-
yarn | "$(Agent.OS)"
22-
yarn
25+
yarn-${{ parameters.cache_version_id }} | "$(Agent.OS)"
2326
path: $(YARN_CACHE_FOLDER)
24-
displayName: Cache yarn packages
27+
displayName: 'Cache yarn packages'
2528

2629
- task: UseNode@1
2730
inputs:

0 commit comments

Comments
 (0)