diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml index f63792367fe78b..1844a4b7a0c6f9 100644 --- a/eng/pipelines/libraries/helix.yml +++ b/eng/pipelines/libraries/helix.yml @@ -13,6 +13,15 @@ parameters: extraHelixArguments: '' shouldContinueOnError: false scenarios: '' + # When false, Helix work item and test failures do not fail the build, so the "Send to Helix" + # step still succeeds. Unlike shouldContinueOnError (which only marks the build as + # partiallySucceeded), this produces a fully successful build. Scheduled builds with + # always:false set this so that flaky tests don't cause AzDO to re-queue the same commit daily. + failOnTestFailures: true + # When true, failed Helix work items are surfaced as build warnings (visible in the AzDO + # timeline) instead of being silently ignored. Intended to be paired with failOnTestFailures: + # false so that failures stay visible without failing the build. + warnOnTestFailures: false steps: - script: $(_msbuildCommand) $(_warnAsErrorParamHelixOverride) -restore @@ -26,6 +35,9 @@ steps: /p:TestScope=${{ parameters.testScope }} /p:TestRunNamePrefixSuffix=${{ parameters.testRunNamePrefixSuffix }} /p:HelixBuild=$(Build.BuildNumber) + /p:FailOnWorkItemFailure=${{ parameters.failOnTestFailures }} + /p:FailOnTestFailure=${{ parameters.failOnTestFailures }} + /p:WarnOnHelixTestFailure=${{ parameters.warnOnTestFailures }} ${{ parameters.extraHelixArguments }} /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog displayName: Send to Helix diff --git a/eng/pipelines/libraries/outerloop.yml b/eng/pipelines/libraries/outerloop.yml index 14d26e86dd0b2f..e371a54f7d2de4 100644 --- a/eng/pipelines/libraries/outerloop.yml +++ b/eng/pipelines/libraries/outerloop.yml @@ -52,6 +52,13 @@ extends: testScope: outerloop creator: dotnet-bot testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) + # On scheduled runs (always:false) don't fail the build on Helix work item or + # test failures, so flaky outerloop tests don't keep AzDO re-queueing the same + # commit. The Send to Helix step fully succeeds (not partiallySucceeded). Failed + # work items are still surfaced as warnings in the timeline (warnOnTestFailures). + ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + failOnTestFailures: false + warnOnTestFailures: true - ${{ if eq(variables['isRollingBuild'], false) }}: - template: /eng/pipelines/common/platform-matrix.yml @@ -81,6 +88,11 @@ extends: testScope: outerloop creator: dotnet-bot testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) + # Don't fail scheduled builds on Helix work item/test failures; surface them + # as timeline warnings instead (see above). + ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + failOnTestFailures: false + warnOnTestFailures: true - ${{ if eq(variables['includeWindowsOuterloop'], true) }}: - template: /eng/pipelines/common/platform-matrix.yml @@ -106,3 +118,8 @@ extends: testScope: outerloop creator: dotnet-bot extraHelixArguments: /p:BuildTargetFramework=net48 + # Don't fail scheduled builds on Helix work item/test failures; surface them + # as timeline warnings instead (see above). + ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + failOnTestFailures: false + warnOnTestFailures: true diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 9d564164923760..b0d143d68166da 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -348,4 +348,20 @@ DestinationFiles="@(_FilesToStage -> '$(HelixDependenciesStagingPath)\%(DirName)\%(RecursiveDir)%(FileName)%(Extension)')" SkipUnchangedFiles="true" /> + + + + +