From 03fe5f3f7596bcea68d89c4a9e74382eb865ba97 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 23 Sep 2020 07:18:55 -0500 Subject: [PATCH] Cache script/script-runner/node_modules --- script/vsts/platforms/templates/bootstrap.yml | 2 +- script/vsts/platforms/templates/cache.yml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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: