From 8453a07dfa9756e0c268fcf7388db62c53d5080c Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Sun, 13 Sep 2020 11:40:33 -0700
Subject: [PATCH] Pass `$(MicrosoftNETCoreAppInternalPackageVersion)` to Helix
jobs (#25850)
- required for servicing, where e.g. `5.0.0` may be ambiguous
- also move `%DOTNET_HOME%` into the working directory
- reduces build-up in `%HELIX_CORRELATION_PAYLOAD%` and aligns w/ build.sh
nit: add more debug output to `runtests.*`
---
eng/helix/content/runtests.cmd | 11 +++++++++--
eng/helix/content/runtests.sh | 6 ++++++
eng/targets/Helix.targets | 6 +++---
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/eng/helix/content/runtests.cmd b/eng/helix/content/runtests.cmd
index e8091960aa..68bc1bf494 100644
--- a/eng/helix/content/runtests.cmd
+++ b/eng/helix/content/runtests.cmd
@@ -15,21 +15,28 @@ REM Batch only supports up to 9 arguments using the %# syntax, need to shift to
shift
set $feedCred=%9
-set DOTNET_HOME=%HELIX_CORRELATION_PAYLOAD%\sdk
+set DOTNET_HOME=%CD%\sdk%random%
set DOTNET_ROOT=%DOTNET_HOME%\%$arch%
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set DOTNET_MULTILEVEL_LOOKUP=0
-set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home
+set DOTNET_CLI_HOME=%CD%\home%random%
set "PATH=%DOTNET_ROOT%;%PATH%;%HELIX_CORRELATION_PAYLOAD%\node\bin"
echo Set path to: "%PATH%"
+echo.
+echo "InstallDotNet %DOTNET_ROOT% %$sdkVersion% %$arch% '' $true '' '' $true"
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$sdkVersion% %$arch% '' $true '' '' $true"
+echo.
+
IF [%$feedCred%] == [] (
+ echo "InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true '' '' $true"
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true '' '' $true"
) else (
+ echo "InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true https://dotnetclimsrc.blob.core.windows.net/dotnet ... $true"
powershell.exe -noLogo -NoProfile -ExecutionPolicy unrestricted -command ". eng\common\tools.ps1; InstallDotNet %DOTNET_ROOT% %$runtimeVersion% %$arch% dotnet $true https://dotnetclimsrc.blob.core.windows.net/dotnet %$feedCred% $true"
)
+echo.
set exit_code=0
diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh
index 2458a7bcfb..f0ca1b76a6 100644
--- a/eng/helix/content/runtests.sh
+++ b/eng/helix/content/runtests.sh
@@ -31,24 +31,30 @@ YELLOW="\033[0;33m"
MAGENTA="\033[0;95m"
. eng/common/tools.sh
+echo "InstallDotNet $DOTNET_ROOT $dotnet_sdk_version '' '' true"
InstallDotNet $DOTNET_ROOT $dotnet_sdk_version "" "" true || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
+echo
+
if [[ -z "${10:-}" ]]; then
+ echo "InstallDotNet $DOTNET_ROOT $dotnet_runtime_version '' dotnet true"
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
else
+ echo "InstallDotNet $DOTNET_ROOT $dotnet_runtime_version '' dotnet true https://dotnetclimsrc.blob.core.windows.net/dotnet ..."
InstallDotNet $DOTNET_ROOT $dotnet_runtime_version "" dotnet true https://dotnetclimsrc.blob.core.windows.net/dotnet ${10} || {
exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
fi
+echo
if [ -e /proc/self/coredump_filter ]; then
# Include memory in private and shared file-backed mappings in the dump.
diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets
index ca580d1ed5..c4a943a280 100644
--- a/eng/targets/Helix.targets
+++ b/eng/targets/Helix.targets
@@ -20,7 +20,7 @@
-
+
@@ -137,8 +137,8 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
When the targeting pack builds, it has exactly the same version as the shared framework. Passing
SharedFxVersion because that's needed even when the targeting pack isn't building.
-->
- call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)
- ./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)
+ call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppInternalPackageVersion) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)
+ ./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppInternalPackageVersion) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion) $(HelixTimeout) $(DotNetRuntimeSourceFeedKey)
$(HelixCommand)
$(HelixTimeout)