diff --git a/script/vsts/platforms/templates/bootstrap.yml b/script/vsts/platforms/templates/bootstrap.yml index 86aad2afe09a..a53fd62cfef1 100644 --- a/script/vsts/platforms/templates/bootstrap.yml +++ b/script/vsts/platforms/templates/bootstrap.yml @@ -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')) diff --git a/script/vsts/platforms/templates/cache.yml b/script/vsts/platforms/templates/cache.yml index fedba01a6b37..4a767c39503d 100644 --- a/script/vsts/platforms/templates/cache.yml +++ b/script/vsts/platforms/templates/cache.yml @@ -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: