post-build step in a scripted pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

post-build step in a scripted pipeline

Richard Ginga
As I understand it, the only post-build capability in scripted pipeline is try/catch/finally but I don't know what data is available to me in a catch block?

Our scripted pipelines sequence some series of freestyle jobs, some in parallel. It is not easy for our project managers to click through the logs to et the actual failure. I want to parse the pipeline log on failure and produce a more useful email.

a typical pipeline failure log will end with something like this: (after several parallel

[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
ERROR: STT_LiveClone_Server #598 completed with status FAILURE (propagate: false to ignore)
Finished: FAILURE

but my experimenting shows me that the ERROR line is not yet in the log when the catch block executes so I can't gather that job and build number information

--
Dick Ginga
Build Engineer

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAL3PpaWovL0_yF4uqwrpA_ntMWw0-vBnDZ1jqcoOJkgp6yf3tA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.