diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index e4070400a..aaf9eeb9f 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -144,6 +144,7 @@ stages: parameters: RepoOwner: Azure RepoName: azure-sdk-vcpkg-betas + SetVcpkgRoot: false - template: /eng/pipelines/templates/steps/vcpkg-publish.yml parameters: diff --git a/eng/pipelines/templates/steps/vcpkg-clone.yml b/eng/pipelines/templates/steps/vcpkg-clone.yml index b374bee15..eb0f1dc8a 100644 --- a/eng/pipelines/templates/steps/vcpkg-clone.yml +++ b/eng/pipelines/templates/steps/vcpkg-clone.yml @@ -3,6 +3,7 @@ parameters: RepoOwner: not-set RepoName: vcpkg PRBranchName: not-set + SetVcpkgRoot: true steps: - pwsh: | @@ -14,6 +15,13 @@ steps: } displayName: Clone vcpkg (${{ parameters.RepoOwner }}/${{ parameters.RepoName }}) + - ${{ if eq(parameters.SetVcpkgRoot, true) }}: + - pwsh: | + $vcpkgRoot = Resolve-Path "${{ parameters.Workspace }}/${{ parameters.RepoName }}" + Write-Host "Set VCPKG_ROOT: $vcpkgRoot" + Write-Host "##vso[task.setvariable variable=VCPKG_ROOT]$vcpkgRoot" + displayName: Set VCPKG_ROOT + # Check out the PR branch if it's already in remote. Ignore failures. - pwsh: | $ErrorActionPreference = "Continue"