jenkinsci / jenkinsci/nodelabelparameter-plugin

[JENKINS-23129] Node Parameter option "run next build only if build succeeds" does not consider the publisher's result

Open
#522 1 comment 0 reactions 0 assignees View on GitHub
component:nodelabelparameter-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
28
Forks
59
Avg merge
1h 24m
Merged PRs (30d)
3

Description

If you configure a Job with a Node Parameter and the following configuration



  • run next build only if build succeeds

  • node eligibility set to "All Nodes"

    and you select multiple nodes to build the job, the next build will always be triggered by the result of the main build action although a post build step (e.g. JUnit Test publisher) will mark the build as failed or unstable. I was expecting that the overall result will be considered before running the next build.

I added three test cases to the NodeLabelParameterTest class of the acceptance test harness project to underline this

One causes the main build to fail. In that case everything works as expected, subsequent builds are not started after the first build fails

The other two test cases use publishers to change the build result. In both cases the job will be built on all nodes.

---
Originally reported by hm_ende, imported from: Node Parameter option "run next build only if build succeeds" does not consider the publisher's result


  • status: Open
  • priority: Major
  • component(s): nodelabelparameter-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251210-235911

Raw content of original issue

If you configure a Job with a Node Parameter and the following configuration



  • run next build only if build succeeds

  • node eligibility set to "All Nodes"
    and you select multiple nodes to build the job, the next build will always be triggered by the result of the main build action although a post build step (e.g. JUnit Test publisher) will mark the build as failed or unstable. I was expecting that the overall result will be considered before running the next build.

I added three test cases to the NodeLabelParameterTest class of the acceptance test harness project to underline this

One causes the main build to fail. In that case everything works as expected, subsequent builds are not started after the first build fails
The other two test cases use publishers to change the build result. In both cases the job will be built on all nodes.

  • environment: Jenkins 1.563

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.