From 72936ecbf58c2623baa6f68545d0f2c5bda4ef99 Mon Sep 17 00:00:00 2001 From: Pavel Savara Date: Fri, 28 May 2021 07:12:59 +0200 Subject: [PATCH] [wasm][xharness] install development SSL certificate on Helix agent before xharness run via SDK or powershell (#53280) Co-authored-by: Ankit Jain Caused by #53180, #53225 - The original approach to install certificates didn't work because we don't have dotnet SDK, just runtime on Helix agents. - dotnet dev-certs https needs user interaction with a dialog. Instead, using powershelgl to install certs - Wasm.Build.Tests are being disabled here because of #53405 Fixes #53207 --- eng/pipelines/runtime.yml | 2 +- src/libraries/sendtohelixhelp.proj | 43 ++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 818fb1360a8863..ea8796904da9e7 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -296,7 +296,7 @@ jobs: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) scenarios: - - buildwasmapps + #- buildwasmapps - https://github.com/dotnet/runtime/issues/53405 - normal - wasmtestonbrowser condition: >- diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 92bd93bf687461..3001a00bc110ec 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -55,12 +55,10 @@ - true - sdk + true + true packaging- - $([System.IO.File]::ReadAllText('$(RepoRoot)global.json')) - $([System.Text.RegularExpressions.Regex]::Match($(GlobalJsonContent), '(%3F<="dotnet": ").*(%3F=")')) @@ -105,15 +103,18 @@ - + + - - + true + + + true + @@ -121,11 +122,9 @@ + true + true true - true - sdk - $([System.IO.File]::ReadAllText('$(RepoRoot)global.json')) - $([System.Text.RegularExpressions.Regex]::Match($(GlobalJsonContent), '(%3F<="dotnet": ").*(%3F=")')) + powershell -command "New-SelfSignedCertificate -FriendlyName 'ASP.NET Core HTTPS development certificate' -DnsName @('localhost') -Subject 'CN = localhost' -KeyAlgorithm RSA -KeyLength 2048 -HashAlgorithm sha256 -CertStoreLocation 'Cert:\CurrentUser\My' -TextExtension @('2.5.29.37={text}1.3.6.1.5.5.7.3.1','1.3.6.1.4.1.311.84.1.1={hex}02','2.5.29.19={text}') -KeyUsage DigitalSignature,KeyEncipherment" && + - call RunTests.cmd + $(HelixCommand)call RunTests.cmd $(HelixCommand) --runtime-path %HELIX_CORRELATION_PAYLOAD% - ./RunTests.sh + + $(HelixCommand)./RunTests.sh $(HelixCommand) --runtime-path "$HELIX_CORRELATION_PAYLOAD"