File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
pipelines/templates/steps Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+
2+ parameters :
3+ - name : TokenTimeoutInHours
4+ type : number
5+ default : 1
6+
17steps :
28 - pwsh : |
39 Write-Host "Setting vcpkg cache variables for read only access to vcpkg binary and asset caches"
1218 azureSubscription : ' Azure SDK Artifacts'
1319 ScriptType : FilePath
1420 ScriptPath : eng/common/scripts/Set-VcpkgWriteModeCache.ps1
21+ ScriptArguments : -TokenTimeoutInHours ${{ parameters.TokenTimeoutInHours }}
1522 azurePowerShellVersion : LatestVersion
1623 pwsh : true
1724 # This step is idempotent and can be run multiple times in cases of
Original file line number Diff line number Diff line change 11# !/bin/env pwsh
22param (
33 [string ] $StorageAccountName = ' azuresdkartifacts' ,
4- [string ] $StorageContainerName = ' public-vcpkg-container'
4+ [string ] $StorageContainerName = ' public-vcpkg-container' ,
5+ [int ] $TokenTimeoutInHours = 1
56)
67
78$ctx = New-AzStorageContext `
@@ -12,7 +13,7 @@ $vcpkgBinarySourceSas = New-AzStorageContainerSASToken `
1213 - Name $StorageContainerName `
1314 - Permission " rwcl" `
1415 - Context $ctx `
15- - ExpiryTime (Get-Date ).AddHours(1 )
16+ - ExpiryTime (Get-Date ).AddHours($TokenTimeoutInHours )
1617
1718# Ensure redaction of SAS tokens in logs
1819Write-Host " ##vso[task.setvariable variable=VCPKG_BINARY_SAS_TOKEN;issecret=true;]$vcpkgBinarySourceSas "
You can’t perform that action at this time.
0 commit comments