Skip to content

Commit

Permalink
Use template condition instead of runtime condition (#5603)
Browse files Browse the repository at this point in the history
"cpp Resource Group" is only available for internal builds so we need to condition this entire step out on non-internal builds.
  • Loading branch information
weshaggard committed May 7, 2024
1 parent 9e80a87 commit cd3655c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions eng/pipelines/templates/steps/vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ steps:
Write-Host "##vso[task.setvariable variable=X_VCPKG_ASSET_SOURCES_SECRET;issecret=true;]clear;x-azurl,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-asset-container/,,read"
displayName: Set Vcpkg Variables
- task: AzurePowerShell@5
displayName: Set Vcpkg Write-mode Cache
condition: and(succeeded(), eq(variables['System.TeamProject'], 'internal'))
inputs:
azureSubscription: 'cpp Resource Group'
ScriptType: FilePath
ScriptPath: eng/scripts/Set-VcpkgWriteModeCache.ps1
azurePowerShellVersion: LatestVersion
pwsh: true
- ${{if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- task: AzurePowerShell@5
displayName: Set Vcpkg Write-mode Cache
inputs:
azureSubscription: 'cpp Resource Group'
ScriptType: FilePath
ScriptPath: eng/scripts/Set-VcpkgWriteModeCache.ps1
azurePowerShellVersion: LatestVersion
pwsh: true

0 comments on commit cd3655c

Please sign in to comment.