Jenkins build time by node

情到浓时终转凉″ 提交于 2021-01-29 11:14:26

问题


As part of identifying which of our Jenkins nodes might be candidates for decommissioning, I'm trying to generate a summary of nodes and their build times for different jobs.

The closest I've got is the "Build time trend" page for each job, but that just lists the jobs, their status and their build time. What isn't shown is which node it was run on, nor is it grouped by Success, Unstable or Failed status.

What I would like to do is to generate a report, where for each job, every node a which successfully ran that job would be listed, along with the minimum, maximum and average times the job took to run.

How would I go about generating a report like this?

Background

Our Jenkins infrastructure has been built up over time, various machines with various capabilities have been re-purposed to be Jenkins nodes after their previous jobs no longer needed them. While we have lots of jobs which have specific needs, such as certain GPUs or memory configurations, and these have to go on specific nodes, many jobs are free to use whichever node is available.

The trouble is, some of our nodes are older and slower than others. As such, when we push a change it could end up on a node which takes 20 minutes to verify, or one which takes 50 minutes to verify. When you're waiting for a verify tick, the latter can be frustrating.

Note, I'm not interested in how long failed or unstable jobs took to run as these can be ridiculously long or short and those exceptional results would skew the stats of typical successful jobs such that they wouldn't be useful metriocs. I suppose having a % of unstable and/or failed jobs might also allow us to identify jobs that shouldn't be run on those nodes (possibly because it doesn't have enough memory, or access to the right data set etc.) but that's probably an enhancement to add later.

来源:https://stackoverflow.com/questions/64334002/jenkins-build-time-by-node

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!