Skip to content

Added support for the skipMarkingStageUnstable config option - #1241

Merged
timja merged 4 commits into
jenkinsci:masterfrom
arnaudsjs:issue/add-skip-marking-stage-unstable-config-option
Jul 21, 2026
Merged

Added support for the skipMarkingStageUnstable config option#1241
timja merged 4 commits into
jenkinsci:masterfrom
arnaudsjs:issue/add-skip-marking-stage-unstable-config-option

Conversation

@arnaudsjs

Copy link
Copy Markdown
Contributor

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

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@arnaudsjs
arnaudsjs requested a review from a team as a code owner July 13, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 skipMarkingStageUnstable to JUnitResultsStep and applied it in JUnitResultsStepExecution to skip WarningAction (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.

Comment thread src/main/java/hudson/tasks/junit/pipeline/JUnitResultsStep.java
arnaudsjs and others added 2 commits July 15, 2026 08:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@timja timja left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@timja
timja merged commit d753e03 into jenkinsci:master Jul 21, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support not setting a warning action on failed test case

3 participants