Collecting Workflow Run Info in Pipeline

25 views
Skip to first unread message

Zack Sampson

unread,
Oct 17, 2016, 10:34:20 AM10/17/16
to Jenkins Users
Hey,

I'm trying to write a Pipeline job to generate a daily summary of my pipeline runs from the preceding day. I've figured out that in a non-sandboxed, non-CPS block I can get at the hudson instance and from there find the jobs/runs, but I can't find out how to get to the "stage X took Y minutes" data.

Has anyone done this before? Do you know where that data lives within WorkflowRun?

Thanks,
- Zack

Zack Sampson

unread,
Oct 18, 2016, 11:19:46 AM10/18/16
to Jenkins Users
I figured this out. I ended up crawling around the actual workflow UI java code. It's fragile, but this doesn't appear to be supported in a nonfragile way. The classes I used were FlowNodeUtil, Describe, StatusExt, etc.

Baptiste Mathus

unread,
Oct 21, 2016, 1:13:34 PM10/21/16
to jenkins...@googlegroups.com

IMO this is fragile because it's not really a job's job. Seems more like a plugin's one. Might be interesting for others btw. Something like a pipeline-runs-summary plugin.


--
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 jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/db0f58bd-35ca-474a-9849-9e3e8f28235f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages