From 15b6a7abc4fe090b45d57e63c041809b9ccf3fd1 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 15 Sep 2021 12:45:36 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 2009 (#2897) * Skip PSModule caching in container jobs * Add succeeded check to condition Co-authored-by: Wes Haggard Co-authored-by: Ben Broderick Phillips Co-authored-by: Ben Broderick Phillips Co-authored-by: Wes Haggard --- eng/common/pipelines/templates/steps/cache-ps-modules.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/cache-ps-modules.yml b/eng/common/pipelines/templates/steps/cache-ps-modules.yml index 563dba402..ac1368031 100644 --- a/eng/common/pipelines/templates/steps/cache-ps-modules.yml +++ b/eng/common/pipelines/templates/steps/cache-ps-modules.yml @@ -3,8 +3,12 @@ steps: . ./eng/common/scripts/Helpers/PSModule-Helpers.ps1 Write-Host "##vso[task.setvariable variable=CachedPSModulePath]$global:CurrentUserModulePath" displayName: Set PS Modules Cache Directory + # Containers should bake modules into the image to save on pipeline time + condition: and(succeeded(), eq(variables['Container'], '')) - task: Cache@2 inputs: key: 'PSModulePath | $(CacheSalt) | $(Agent.OS) | $(Build.SourcesDirectory)/eng/common/scripts/Import-AzModules.ps1' path: $(CachedPSModulePath) - displayName: Cache PS Modules \ No newline at end of file + displayName: Cache PS Modules + # Containers should bake modules into the image to save on pipeline time + condition: and(succeeded(), eq(variables['Container'], ''))