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 <weshaggard@users.noreply.github.com>

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2021-09-15 12:45:36 -07:00 committed by GitHub
parent 818cab9a2a
commit 15b6a7abc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
displayName: Cache PS Modules
# Containers should bake modules into the image to save on pipeline time
condition: and(succeeded(), eq(variables['Container'], ''))