I need to detect the errors of console output(pipeline/stage failure, java exceptions, etc...) of a jenkins pipeline and make a report to send it to my team.
I tried to find a suitable plugin but they don't seem to have an option to programatically get the errors, then I tried to write a shell script in the post actions but it wouldn't parse the exceptions because they only appear after the post actions in the console output.
Can anyone help me on how to approach to this problem?
You can write a Python script using the Python module, 'python-jenkins' to achieve your desired task. Here is the complete documentation for the Jenkins python wrapper (https://pypi.org/project/python-jenkins/)