Skip to content

Commit

Permalink
Cache script/script-runner/node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 23, 2020
1 parent c382493 commit 03fe5f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion script/vsts/platforms/templates/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ steps:
GITHUB_TOKEN: $(GITHUB_TOKEN)
CI: true
CI_PROVIDER: VSTS
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptRunnerNodeModulesRestored'], true), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))
7 changes: 7 additions & 0 deletions script/vsts/platforms/templates/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ steps:
path: 'node_modules'
cacheHitVar: MainNodeModulesRestored

- task: Cache@2
displayName: Cache script/script-runner/node_modules
inputs:
key: 'npm_script_runner | "$(Agent.OS)" | "$(BUILD_ARCH)" | package.json, package-lock.json, apm/package.json, script/package.json, script/package-lock.json, script/script-runner/package.json, script/script-runner/package-lock.json, script/vsts/platforms/${{ parameters.OS }}.yml, script/vsts/platforms/templates/preparation.yml'
path: 'script/script-runner/node_modules'
cacheHitVar: ScriptRunnerNodeModulesRestored

- task: Cache@2
displayName: Cache script/node_modules
inputs:
Expand Down

0 comments on commit 03fe5f3

Please sign in to comment.