Fix vcpkg cache (#5963)
This commit is contained in:
parent
3433445498
commit
10025fd2a2
@ -1,7 +1,7 @@
|
||||
steps:
|
||||
- pwsh: |
|
||||
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
|
||||
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"
|
||||
Write-Host "##vso[task.setvariable variable=X_VCPKG_ASSET_SOURCES_SECRET;issecret=true;]clear;x-azurl,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,,read"
|
||||
displayName: Set Vcpkg Variables
|
||||
|
||||
- ${{if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
param(
|
||||
[string] $StorageAccountName = 'cppvcpkgcache'
|
||||
[string] $StorageAccountName = 'cppvcpkgcache',
|
||||
[string] $StorageContainerName = 'public-vcpkg-container'
|
||||
)
|
||||
|
||||
|
||||
."$PSScriptRoot/../common/scripts/Helpers/PSModule-Helpers.ps1"
|
||||
|
||||
Write-Host "`$env:PSModulePath = $($env:PSModulePath)"
|
||||
@ -31,8 +31,8 @@ $ctx = New-AzStorageContext `
|
||||
-UseConnectedAccount
|
||||
|
||||
$vcpkgBinarySourceSas = New-AzStorageContainerSASToken `
|
||||
-Name $StorageAccountName `
|
||||
-Permission "rwc" `
|
||||
-Name $StorageContainerName `
|
||||
-Permission "rwcl" `
|
||||
-Context $ctx `
|
||||
-ExpiryTime (Get-Date).AddHours(1)
|
||||
|
||||
@ -40,5 +40,5 @@ Write-Host "Ensure redaction of SAS tokens in logs"
|
||||
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SAS_TOKEN;issecret=true;]$vcpkgBinarySourceSas"
|
||||
|
||||
Write-Host "Setting vcpkg binary cache to read and write"
|
||||
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/public-vcpkg-container,$vcpkgBinarySourceSas,readwrite"
|
||||
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/,?$vcpkgBinarySourceSas,readwrite"
|
||||
Write-Host "##vso[task.setvariable variable=VCPKG_BINARY_SOURCES_SECRET;issecret=true;]clear;x-azblob,https://cppvcpkgcache.blob.core.windows.net/$StorageContainerName,$vcpkgBinarySourceSas,readwrite"
|
||||
Write-Host "##vso[task.setvariable variable=X_VCPKG_ASSET_SOURCES_SECRET;issecret=true;]clear;x-azurl,https://cppvcpkgcache.blob.core.windows.net/$StorageContainerName,$vcpkgBinarySourceSas,readwrite"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user