post-build step in a scripted pipeline

17 views
Skip to first unread message

Richard Ginga

unread,
Jun 15, 2017, 3:42:09 PM6/15/17
to jenkins...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages