jenkinsci / jenkinsci/dependency-track-plugin
Avoid run.setResult(Result.UNSTABLE);
@sephiroth-j is already working on this.
Since Aug 31, 2026.
- Dominant language
- Java
- Stars
- 53
- Forks
- 29
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 6
Description
### Describe the bug
With the current dependencyTrackPublisher method inside stage, we cannot mark the stage and the build as "unstable".
### Plugin Version
7.1.0
### Jenkins Version
2.568.2
### Java Version for Jenkins
21
### Type of Jenkins Job
scripted pipeline
### Dependency-Track Version
4.14.2
### Steps to reproduce the behavior
By using "unstable" thresolds, the build will finish as "unstable" but not the stage. dependencyTrackPublisher returns null so we cannot set stage statut us-self.
By using "failed" thresolds, the build and stage will finish as "failure". We cannot use "catchError" method to change it because the plugin executes "run.setResult(Result.FAILURE);" directly :(
### Expected behavior
By using "failed" thresolds, just throw an Exception should be enough.
By using "unsable" thresolds, return something to know is thresolds were reached
### Additional context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.