[JIRA] (JENKINS-60450) Don't set build status on deptrack failure, throw exceptions instead

2 views
Skip to first unread message

jenkins@richardlee.name (JIRA)

unread,
Dec 11, 2019, 1:58:03 PM12/11/19
to jenkinsc...@googlegroups.com
Richard Lee created an issue
 
Jenkins / Bug JENKINS-60450
Don't set build status on deptrack failure, throw exceptions instead
Issue Type: Bug Bug
Assignee: Steve Springett
Components: dependency-track-plugin
Created: 2019-12-11 18:57
Priority: Major Major
Reporter: Richard Lee

Currently, when the dependencyTrackUpload step encounters an error, it sets the build status to FAILURE.  This is a one-way trip. It is not possible for users of the step to catch and recover from these errors, as there is no way to downgrade the build status from FAILURE.

It would be much better, and more in the style of most other build steps, for dependencyTrackUpload to throw an exception when it encounters an error.  Preferably different exceptions for configuration problems (e.g. unable to contact the deptrack server) vs threat threshold violations.  That way:

a) by default, builds will abort immediately when the dependencyTrackUpload step encounters an error, rather than silently continuing on with further steps and then marking the build as failed after all the other steps complete, which might have included continuous deployment steps.

b) users who want to suppress dependencyTrackUpload errors can do so via a try/catch block around the step, and then provide whatever custom build status handling they'd like.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages