diff --git a/RunCheckInTestsWithPAT.ps1 b/RunCheckInTestsWithPAT.ps1 index 3064ea2b1..dca18a0ac 100644 --- a/RunCheckInTestsWithPAT.ps1 +++ b/RunCheckInTestsWithPAT.ps1 @@ -10,8 +10,13 @@ [Parameter(mandatory=$true)] [String]$args ) -[Environment]::SetEnvironmentVariable("1ESSHAREDASSETS_BUILDXL_FEED_PAT", $1esPat, "Process") -[Environment]::SetEnvironmentVariable("CLOUDBUILD_BUILDXL_SELFHOST_FEED_PAT", $cbPat, "Process") [Environment]::SetEnvironmentVariable("MSENG_GIT_PAT", $msEngGitPat, "Process") -[Environment]::SetEnvironmentVariable("NUGET_CREDENTIALPROVIDERS_PATH", $ncPath, "Process") +[Environment]::SetEnvironmentVariable("VSS_NUGET_EXTERNAL_FEED_ENDPOINTS", " +{ + 'endpointCredentials': [ + {'endpoint':'https://pkgs.dev.azure.com/1essharedassets/_packaging/BuildXL/nuget/v3/index.json', 'password':'$1esPat'}, + {'endpoint':'https://pkgs.dev.azure.com/cloudbuild/_packaging/BuildXL.Selfhost/nuget/v3/index.json', 'password':'$cbPat'} + ] +}", "Process") + .\RunCheckInTests.cmd /lab $args /internal \ No newline at end of file diff --git a/Shared/Scripts/Init.cmd b/Shared/Scripts/Init.cmd index 7589c28db..2b499ebcb 100644 --- a/Shared/Scripts/Init.cmd +++ b/Shared/Scripts/Init.cmd @@ -86,6 +86,9 @@ REM ********************************* exit /b 1 ) + REM Install latest Azure Artifacts Credentials Provider (https://github.com/microsoft/artifacts-credprovider) + powershell -Command "iex ""& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx""" + set _BUILDXL_BOOTSTRAP_OUT=%ENLISTMENTROOT%\Out\BootStrap REM use nuget to pull the current LKG down @@ -108,11 +111,6 @@ REM ********************************* set BUILDXL_LKG_FEED_1= set _BUILDXL_INIT_HASH=%_BUILDXL_INIT_HASH_NEW% - REM We'll conditionally set the credential provider if not set on the machine. - REM If not set we will set it to the local one in the enlistment but iwth the b-drive substitution - if NOT DEFINED NUGET_CREDENTIALPROVIDERS_PATH ( - set NUGET_CREDENTIALPROVIDERS_PATH=%TOOLROOT% - ) goto :EOF diff --git a/Shared/Scripts/bxl.ps1 b/Shared/Scripts/bxl.ps1 index c9380b998..f1e1ac60d 100644 --- a/Shared/Scripts/bxl.ps1 +++ b/Shared/Scripts/bxl.ps1 @@ -541,9 +541,7 @@ Log -NoNewline "Building using the "; Log-Emphasis -NoNewline $($useDeployment.description) Log " version of BuildXL."; -$Nuget_CredentialProviders_Path = [Environment]::GetEnvironmentVariable("NUGET_CREDENTIALPROVIDERS_PATH"); - -$AdditionalBuildXLArguments += "/environment:$($useDeployment.telemetryEnvironment) /unsafe_GlobalUntrackedScopes:$Nuget_CredentialProviders_Path /unsafe_GlobalPassthroughEnvVars:NUGET_CREDENTIALPROVIDERS_PATH"; +$AdditionalBuildXLArguments += "/environment:$($useDeployment.telemetryEnvironment)"; $GenerateCgManifestFilePath = "$NormalizationDrive\cg\nuget\cgmanifest.json"; $AdditionalBuildXLArguments += "/generateCgManifestForNugets:$GenerateCgManifestFilePath";