Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 2009 (Azure#20672)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
4 people authored and hildurhodd committed Sep 24, 2021
1 parent fac2724 commit c35e022
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eng/common/pipelines/templates/steps/cache-ps-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'], ''))

0 comments on commit c35e022

Please sign in to comment.