From c01c027f4a6b234d142923e235e773737fb7e0fc Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Fri, 4 Nov 2022 20:01:55 +0000 Subject: [PATCH] Merged PR 23116: Fix issues with building test artifacts Insert the pre-release nuget feed before building test artifacts --- build.psm1 | 11 ++++++++++- test/Test.Common.props | 2 +- .../azureDevOps/templates/testartifacts.yml | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index d486451dee..8fac6c4f04 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1141,7 +1141,16 @@ function Publish-PSTestTools { $runtime = $Options.Runtime } - dotnet publish --output bin --configuration $Options.Configuration --framework $Options.Framework --runtime $runtime --self-contained + Write-Verbose -Verbose -Message "Starting dotnet publish for $toolPath with runtime $runtime" + + dotnet publish --output bin --configuration $Options.Configuration --framework $Options.Framework --runtime $runtime --self-contained | Out-String | Write-Verbose -Verbose + + $dll = $null + $dll = Get-ChildItem -Path bin -Recurse -Filter "*.dll" + + if (-not $dll) { + throw "Failed to find exe in $toolPath" + } if ( -not $env:PATH.Contains($toolPath) ) { $env:PATH = $toolPath+$TestModulePathSeparator+$($env:PATH) diff --git a/test/Test.Common.props b/test/Test.Common.props index cdfe931012..84424241e7 100644 --- a/test/Test.Common.props +++ b/test/Test.Common.props @@ -21,7 +21,7 @@ - true + false diff --git a/tools/releaseBuild/azureDevOps/templates/testartifacts.yml b/tools/releaseBuild/azureDevOps/templates/testartifacts.yml index 009723c880..b76ec0514b 100644 --- a/tools/releaseBuild/azureDevOps/templates/testartifacts.yml +++ b/tools/releaseBuild/azureDevOps/templates/testartifacts.yml @@ -15,6 +15,10 @@ jobs: - checkout: self clean: true + - template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml + parameters: + repoRoot: $(Build.SourcesDirectory) + - pwsh: | Import-Module ./build.psm1 Start-PSBootstrap @@ -63,5 +67,6 @@ jobs: BuildTestPackage -runtime linux-musl-x64 displayName: Build test package and upload + retryCountOnTaskFailure: 1 - template: /tools/releaseBuild/azureDevOps/templates/step/finalize.yml