I’m looking to get a way to calculate all our job build minutes, from all projects (folder). Currently, we run Jenkins in Kubernetes using build agents.
Is this information stored internally, or would I need to write something in each pipeline and write to some DB?
You can get access to the build duration via the JSON API each job.
It will have a property named “duration” that I believe is in milliseconds.
You could have a job that automatically runs weekly/monthly to collect this data, or something outside of Jenkins.
OK, thanks I will put my thinking hat on.
so it will be in the JSON response like
"timestamp" : 1666091400722,
What about one of the many metrics plugins? For example I use the prometheus plugin to generate https://ci.g4v.dev/prometheus/ which can include average build duration.
Something like that, take a look at a result via web browser.