Merged PR 599407: Add Azure Artifacts Credential Provider

Use the [azure artifacts provider binaries](https://github.com/microsoft/artifacts-credprovider) for Part B pipeline.

Related work items: #1819575
This commit is contained in:
Pasindu Gunasekara 2021-02-26 00:10:35 +00:00
Родитель e6dca5ae4f
Коммит 7beb99452a
3 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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";