Merged PR 669257: Don't use the NuGet cache when downloading the BuildXL LKG on local builds

NuGet uses a shared non-deduplicated cache by default. On local machines this results in a lot of space taken by stale bxl LKGs. Skip the cache for this case to save on disk space. The only scenario that a shared cache could be helping with in this case is if a developer has multiple bxl enlistments, but this case is not super common, and it will only save download time (not space).
This commit is contained in:
Serge Mera 2022-07-05 18:40:38 +00:00
Родитель 77fd723d1c
Коммит f3f3fbd53f
1 изменённых файлов: 10 добавлений и 1 удалений

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

@ -91,14 +91,23 @@ REM *********************************
set _BUILDXL_BOOTSTRAP_OUT=%ENLISTMENTROOT%\Out\BootStrap
SETLOCAL
REM If not on ADO, don't use the NuGet cache when downloading the LKG
if "%TF_BUILD%" == "" (
set DIRECTDOWNLOAD="-DirectDownload"
)
REM use nuget to pull the current LKG down
echo BUILDXL-Init: Using nuget to Pull package '%BUILDXL_LKG_NAME%' version '%BUILDXL_LKG_VERSION%'
%TOOLROOT%\nuget.exe install -OutputDirectory %_BUILDXL_BOOTSTRAP_OUT% -Source %BUILDXL_LKG_FEED_1% %BUILDXL_LKG_NAME% -Version %BUILDXL_LKG_VERSION% %BUILDXL_NUGET_WORKAROUNDS%
%TOOLROOT%\nuget.exe install %DIRECTDOWNLOAD% -OutputDirectory %_BUILDXL_BOOTSTRAP_OUT% -Source %BUILDXL_LKG_FEED_1% %BUILDXL_LKG_NAME% -Version %BUILDXL_LKG_VERSION% %BUILDXL_NUGET_WORKAROUNDS%
if ERRORLEVEL 1 (
echo ERROR: Failed to pull nuget package
exit /b 1
)
ENDLOCAL
goto :EOF
REM *********************************