diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml index f63792367fe78b..269a13055a0c36 100644 --- a/eng/pipelines/libraries/helix.yml +++ b/eng/pipelines/libraries/helix.yml @@ -13,6 +13,11 @@ 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 steps: - script: $(_msbuildCommand) $(_warnAsErrorParamHelixOverride) -restore @@ -26,6 +31,8 @@ steps: /p:TestScope=${{ parameters.testScope }} /p:TestRunNamePrefixSuffix=${{ parameters.testRunNamePrefixSuffix }} /p:HelixBuild=$(Build.BuildNumber) + /p:FailOnWorkItemFailure=${{ parameters.failOnTestFailures }} + /p:FailOnTestFailure=${{ parameters.failOnTestFailures }} ${{ 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..b710d294539155 100644 --- a/eng/pipelines/libraries/outerloop.yml +++ b/eng/pipelines/libraries/outerloop.yml @@ -52,6 +52,11 @@ 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). + ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + failOnTestFailures: false - ${{ if eq(variables['isRollingBuild'], false) }}: - template: /eng/pipelines/common/platform-matrix.yml @@ -81,6 +86,9 @@ extends: testScope: outerloop creator: dotnet-bot testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) + # Don't fail scheduled builds on Helix work item/test failures (see above). + ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + failOnTestFailures: false - ${{ if eq(variables['includeWindowsOuterloop'], true) }}: - template: /eng/pipelines/common/platform-matrix.yml @@ -106,3 +114,6 @@ extends: testScope: outerloop creator: dotnet-bot extraHelixArguments: /p:BuildTargetFramework=net48 + # Don't fail scheduled builds on Helix work item/test failures (see above). + ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + failOnTestFailures: false