diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml index 03b3cf1ebaffca..6733be837055a4 100644 --- a/eng/pipelines/libraries/helix.yml +++ b/eng/pipelines/libraries/helix.yml @@ -16,6 +16,15 @@ parameters: SuperPmiCollect: '' SuperPmiCollectionType: '' SuperPmiCollectionName: '' + # 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 @@ -29,6 +38,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 afc38926ea35eb..1d21af5a46db72 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=net481 + # 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 29ed70e4ff171a..c2d0b3be0cff58 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -384,4 +384,20 @@ DestinationFiles="@(_FilesToStage -> '$(HelixDependenciesStagingPath)\%(DirName)\%(RecursiveDir)%(FileName)%(Extension)')" SkipUnchangedFiles="true" /> + + + + +