-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using cache template in the workflows
- Loading branch information
Showing
3 changed files
with
12 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,26 +30,9 @@ jobs: | |
- script: npm install --global [email protected] | ||
displayName: Update npm | ||
|
||
- task: Cache@2 | ||
displayName: Cache node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | package.json, package-lock.json, script/vsts/platforms/linux.yml' | ||
path: 'node_modules' | ||
cacheHitVar: MainNodeModulesRestored | ||
|
||
- task: Cache@2 | ||
displayName: Cache script/node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | script/package.json, script/package-lock.json, script/vsts/platforms/linux.yml' | ||
path: 'script/node_modules' | ||
cacheHitVar: ScriptNodeModulesRestored | ||
|
||
- task: Cache@2 | ||
displayName: Cache apm/node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | apm/package.json, apm/package-lock.json, script/vsts/platforms/linux.yml' | ||
path: 'apm/node_modules' | ||
cacheHitVar: ApmNodeModulesRestored | ||
- template: cache.yml | ||
parameters: | ||
OS: linux | ||
|
||
- script: script/bootstrap | ||
displayName: Bootstrap build environment | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,26 +20,9 @@ jobs: | |
- script: npm install --global [email protected] | ||
displayName: Update npm | ||
|
||
- task: Cache@2 | ||
displayName: Cache node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | package.json, package-lock.json, script/vsts/platforms/macos.yml' | ||
path: 'node_modules' | ||
cacheHitVar: MainNodeModulesRestored | ||
|
||
- task: Cache@2 | ||
displayName: Cache script/node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | script/package.json, script/package-lock.json, script/vsts/platforms/macos.yml' | ||
path: 'script/node_modules' | ||
cacheHitVar: ScriptNodeModulesRestored | ||
|
||
- task: Cache@2 | ||
displayName: Cache apm/node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | apm/package.json, apm/package-lock.json, script/vsts/platforms/macos.yml' | ||
path: 'apm/node_modules' | ||
cacheHitVar: ApmNodeModulesRestored | ||
- template: cache.yml | ||
parameters: | ||
OS: macos | ||
|
||
- script: script/bootstrap | ||
displayName: Bootstrap build environment | ||
|
@@ -128,26 +111,9 @@ jobs: | |
- script: npm install --global [email protected] | ||
displayName: Update npm | ||
|
||
- task: Cache@2 | ||
displayName: Cache node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | package.json, package-lock.json, script/vsts/platforms/macos.yml' | ||
path: 'node_modules' | ||
cacheHitVar: MainNodeModulesRestored | ||
|
||
- task: Cache@2 | ||
displayName: Cache script/node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | script/package.json, script/package-lock.json, script/vsts/platforms/macos.yml' | ||
path: 'script/node_modules' | ||
cacheHitVar: ScriptNodeModulesRestored | ||
|
||
- task: Cache@2 | ||
displayName: Cache apm/node_modules | ||
inputs: | ||
key: 'npm | "$(Agent.OS)" | apm/package.json, apm/package-lock.json, script/vsts/platforms/macos.yml' | ||
path: 'apm/node_modules' | ||
cacheHitVar: ApmNodeModulesRestored | ||
- template: cache.yml | ||
parameters: | ||
OS: macos | ||
|
||
# The artifact caching task does not work on forks, so we need to | ||
# bootstrap again for pull requests coming from forked repositories. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters