jenkinsci / jenkinsci/dependency-track-plugin

Avoid run.setResult(Result.UNSTABLE);

Open
#461 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.