Skip to content

Commit ca37fcf

Browse files
committed
cache template
1 parent fc4dc84 commit ca37fcf

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

script/vsts/platforms/cache.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
parameters:
2+
- name: OS
3+
displayName: Operating System
4+
type: string
5+
values:
6+
- windows
7+
- linux
8+
- macos
9+
10+
steps:
11+
- task: Cache@2
12+
displayName: Cache node_modules
13+
inputs:
14+
key: 'npm | "$(Agent.OS)" | "$(buildArch)" | package.json, package-lock.json, script/vsts/platforms/{{ parameters.OS }}.yml'
15+
path: 'node_modules'
16+
cacheHitVar: MainNodeModulesRestored
17+
18+
- task: Cache@2
19+
displayName: Cache script/node_modules
20+
inputs:
21+
key: 'npm | "$(Agent.OS)" | "$(buildArch)" | script/package.json, script/package-lock.json, script/vsts/platforms/{{ parameters.OS }}.yml'
22+
path: 'script/node_modules'
23+
cacheHitVar: ScriptNodeModulesRestored
24+
25+
- task: Cache@2
26+
displayName: Cache apm/node_modules
27+
inputs:
28+
key: 'npm | "$(Agent.OS)" | "$(buildArch)" | apm/package.json, apm/package-lock.json, script/vsts/platforms/{{ parameters.OS }}.yml'
29+
path: 'apm/node_modules'
30+
cacheHitVar: ApmNodeModulesRestored

0 commit comments

Comments
 (0)