From 081ea3afaee5ca79bd8be3bf11761509c8353345 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 15 Apr 2020 14:32:08 -0700 Subject: [PATCH 1/5] Try using helix sdk payload support instead --- eng/helix/content/runtests.cmd | 4 ++-- eng/helix/content/runtests.sh | 26 +++++++++++++------------- eng/helix/helix.proj | 3 +++ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/eng/helix/content/runtests.cmd b/eng/helix/content/runtests.cmd index 44d8b83c57f7..b9141860f0bd 100644 --- a/eng/helix/content/runtests.cmd +++ b/eng/helix/content/runtests.cmd @@ -15,8 +15,8 @@ set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin echo Set path to: %PATH% -echo "Installing SDK" -powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Version %$sdkVersion% -InstallDir %DOTNET_ROOT%" +echo "Installing SDK Skipped" +echo powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Version %$sdkVersion% -InstallDir %DOTNET_ROOT%" echo "Installing Runtime" powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Runtime dotnet -Version %$runtimeVersion% -InstallDir %DOTNET_ROOT%" diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh index 0a5742db395b..117a95c5ac1b 100644 --- a/eng/helix/content/runtests.sh +++ b/eng/helix/content/runtests.sh @@ -47,19 +47,19 @@ fi # Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) chmod +x "dotnet-install.sh"; sync -./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" -if [ $? -ne 0 ]; then - sdk_retries=3 - while [ $sdk_retries -gt 0 ]; do - ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" - if [ $? -ne 0 ]; then - let sdk_retries=sdk_retries-1 - echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}" - else - sdk_retries=0 - fi - done -fi +# ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" +#if [ $? -ne 0 ]; then +# sdk_retries=3 +# while [ $sdk_retries -gt 0 ]; do +# ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" +# if [ $? -ne 0 ]; then +# let sdk_retries=sdk_retries-1 +# echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}" +# else +# sdk_retries=0 +# fi +# done +#fi ./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT" if [ $? -ne 0 ]; then diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index b90569314536..08d353410ea0 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -23,6 +23,9 @@ true 2 $(HelixApiAccessToken) + true + sdk + $(NETCoreSdkVersion) From 152da8540c7144160a9276a646e546090ff07112 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 15 Apr 2020 16:54:43 -0700 Subject: [PATCH 2/5] Remove sdk bootstrapping --- eng/helix/content/runtests.cmd | 2 -- eng/helix/content/runtests.sh | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/eng/helix/content/runtests.cmd b/eng/helix/content/runtests.cmd index b9141860f0bd..26887e01de37 100644 --- a/eng/helix/content/runtests.cmd +++ b/eng/helix/content/runtests.cmd @@ -15,8 +15,6 @@ set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin echo Set path to: %PATH% -echo "Installing SDK Skipped" -echo powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Version %$sdkVersion% -InstallDir %DOTNET_ROOT%" echo "Installing Runtime" powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Runtime dotnet -Version %$runtimeVersion% -InstallDir %DOTNET_ROOT%" diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh index 117a95c5ac1b..abf0477a361b 100644 --- a/eng/helix/content/runtests.sh +++ b/eng/helix/content/runtests.sh @@ -47,20 +47,6 @@ fi # Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) chmod +x "dotnet-install.sh"; sync -# ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" -#if [ $? -ne 0 ]; then -# sdk_retries=3 -# while [ $sdk_retries -gt 0 ]; do -# ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" -# if [ $? -ne 0 ]; then -# let sdk_retries=sdk_retries-1 -# echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}" -# else -# sdk_retries=0 -# fi -# done -#fi - ./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT" if [ $? -ne 0 ]; then runtime_retries=3 From 118c28e9d3446c744175b73a99ba2001da00b823 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 15 Apr 2020 21:55:39 -0700 Subject: [PATCH 3/5] Builds so hung... From 047bfbcb47a6322424a40da3018ab6f56ac445c8 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 16 Apr 2020 10:05:08 -0700 Subject: [PATCH 4/5] Force build From fcc5495701b2770bd2e540ca6233498bb70960d6 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 16 Apr 2020 14:59:20 -0700 Subject: [PATCH 5/5] Try running dotnet from path --- eng/helix/content/runtests.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh index abf0477a361b..141520514c74 100644 --- a/eng/helix/content/runtests.sh +++ b/eng/helix/content/runtests.sh @@ -17,7 +17,7 @@ export DOTNET_ROOT="$DIR/.dotnet$RANDOM" export PATH="$DOTNET_ROOT:$PATH:$DIR/node/bin" # Prevent fallback to global .NET locations. This ensures our tests use the shared frameworks we specify and don't rollforward to something else that might be installed on the machine -export DOTNET_MULTILEVEL_LOOKUP=0 +export DOTNET_MULTILEVEL_LOOKUP=0 # Avoid contaminating userprofiles # Add $random to path to ensure tests don't expect home to be in a particular path @@ -72,10 +72,10 @@ fi sync exit_code=0 -echo "Restore: $DOTNET_ROOT/dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources..." -$DOTNET_ROOT/dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources -echo "Running tests: $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9..." -$DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 +echo "Restore: dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources..." +dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources +echo "Running tests: dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9..." +dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 exit_code=$? echo "Finished tests...exit_code=$exit_code" exit $exit_code