From 04409f28df4fb824c064681d3f3ca966ad5e2942 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Tue, 19 Sep 2023 11:54:20 -0700 Subject: [PATCH] Add X_VCPKG_ASSET_SOURCES to vcpkg cache configuration (#4824) * Add X_VCPKG_ASSET_SOURCES to vcpkg cache configuration * Prefix with quesiton mark * Remove question mark * add --debug * /,? * x-azurl * Remove --debug * Test no binary cache * Clear * Ensure ending of X_VCPKG_ASSET_SOURCES * Include secrets * Undo some investigation * + _SECRET * Revert testing-related changes --- .vscode/cspell.json | 1 + eng/pipelines/templates/steps/cmake-build.yml | 1 + eng/pipelines/templates/steps/vcpkg.yml | 1 + eng/scripts/Set-VcpkgWriteModeCache.ps1 | 1 + 4 files changed, 4 insertions(+) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 822d37130..5947a78eb 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -47,6 +47,7 @@ "azsdkengsys", "azurecr", "azuresdk", + "azurl", "azuresdkforcpp", "centralus", "centraluseuap", diff --git a/eng/pipelines/templates/steps/cmake-build.yml b/eng/pipelines/templates/steps/cmake-build.yml index 7345c9433..a9a5d80c3 100644 --- a/eng/pipelines/templates/steps/cmake-build.yml +++ b/eng/pipelines/templates/steps/cmake-build.yml @@ -21,6 +21,7 @@ steps: displayName: cmake generate env: VCPKG_BINARY_SOURCES: $(VCPKG_BINARY_SOURCES_SECRET) + X_VCPKG_ASSET_SOURCES: $(X_VCPKG_ASSET_SOURCES_SECRET) # Core should build all cmake tagets - ${{ if and(eq(parameters.Build, true), eq(parameters.ServiceDirectory, 'core')) }}: diff --git a/eng/pipelines/templates/steps/vcpkg.yml b/eng/pipelines/templates/steps/vcpkg.yml index 54ad698c4..907c91ce4 100644 --- a/eng/pipelines/templates/steps/vcpkg.yml +++ b/eng/pipelines/templates/steps/vcpkg.yml @@ -1,6 +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" displayName: Set Vcpkg Variables - task: PowerShell@2 diff --git a/eng/scripts/Set-VcpkgWriteModeCache.ps1 b/eng/scripts/Set-VcpkgWriteModeCache.ps1 index 345d0edb2..c91eaeb25 100644 --- a/eng/scripts/Set-VcpkgWriteModeCache.ps1 +++ b/eng/scripts/Set-VcpkgWriteModeCache.ps1 @@ -39,3 +39,4 @@ $vcpkgBinarySourceSas = $token.Substring(1) 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"