Added support for the skipMarkingStageUnstable config option - #1241
Merged
timja merged 4 commits intoJul 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Pipeline junit step option, skipMarkingStageUnstable, to prevent attaching a WarningAction when tests fail so that stages (and consequently builds) are not marked UNSTABLE while still recording test results—addressing #1238.
Changes:
- Added
skipMarkingStageUnstabletoJUnitResultsStepand applied it inJUnitResultsStepExecutionto skipWarningAction(and build result mutation) on test failures. - Extended Pipeline step tests to cover the new behavior.
- Documented the new option across help and README, and clarified interaction with
skipMarkingBuildUnstable.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/hudson/tasks/junit/pipeline/JUnitResultsStepTest.java | Adds a Pipeline test ensuring failures don’t attach WarningAction when skipMarkingStageUnstable is enabled. |
| src/main/resources/hudson/tasks/junit/pipeline/JUnitResultsStep/help-skipMarkingStageUnstable.html | New help content documenting the new option and its effect. |
| src/main/resources/hudson/tasks/junit/pipeline/JUnitResultsStep/help-skipMarkingBuildUnstable.html | Updates help text to clarify interaction with skipMarkingStageUnstable. |
| src/main/resources/hudson/tasks/junit/pipeline/JUnitResultsStep/config.jelly | Adds the new checkbox to the Pipeline step configuration UI. |
| src/main/java/hudson/tasks/junit/pipeline/JUnitResultsStepExecution.java | Implements the behavior change: skips WarningAction and build UNSTABLE marking when configured. |
| src/main/java/hudson/tasks/junit/pipeline/JUnitResultsStep.java | Adds the new DataBound option (skipMarkingStageUnstable). |
| README.md | Documents the new option and clarifies semantics vs skipMarkingBuildUnstable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the skipMarkingStageUnstable configuration option. If checked, a failed test will not mark the the node, stage or build as unstable.
Closes #1238
Testing done
The test suite was extended with automated tests.
Submitter checklist