From 92957377fc2b3fc7bb506b78a4ad0b38f24a68cb Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Tue, 20 Sep 2022 10:20:06 -0700 Subject: [PATCH] Set VCPKG_ROOT (#3938) * Set VCPKG_ROOT * Update eng/pipelines/templates/steps/vcpkg-clone.yml Co-authored-by: Ben Broderick Phillips Co-authored-by: Ben Broderick Phillips --- eng/pipelines/templates/stages/archetype-cpp-release.yml | 1 + eng/pipelines/templates/steps/vcpkg-clone.yml | 8 ++++++++ 2 files changed, 9 insertions(+) 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"