Question regarding AbortException in Pipelines

41 views
Skip to first unread message

Victor Martinez

unread,
Feb 17, 2022, 8:34:29 AM2/17/22
to Jenkins Developers
I'd like to get your feedback regarding the AbortException for a Pipeline and whether it's possible to query the exception at runtime.

I searched on https://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html but I could not find a clear method that I could use to know what exception was triggered.

I asked here rather than in the Jenkins Users, since this is about the build internals. Sorry if this is not the right place to ask for.

But as far as I see, those AbortExceptions are reported in the traditional Jenkins UI, while I'd like to enhance the development experience when debugging errors by highlighting the ones which are caused by some misconfiguration.

For instance:

11:09:05 ERROR: Credentials 'xxx is of type 'Secret file' where 'org.jenkinsci.plugins.plaincredentials.StringCredentials' was expected

is shown in the console output as a consequence of a misconfiguration in the pipeline

And I'd like to highlight this error within a post-build action in the Pipeline (either an email, slack notification, GitHub comment) but something that can help contributors to understand what's the error about.

Thanks

Reply all
Reply to author
Forward
0 new messages