1

Is there a jenkins plugin or native way to measure how many hours (in a day, week or month - whatever duration feasible) the build was RED for a job?

Background:

I am currently working with a team and promoting trunk based development. One thing that I want to measure to check if our efforts toward "Collective code ownership" works - No. of hours in RED state.

I don't want to measure number of RED builds but instead the duration of RED because breaking the build is not important to me, but fixing is.

Jesse Glick
  • 24,539
  • 10
  • 90
  • 112
vivek_ganesan
  • 658
  • 4
  • 19

1 Answers1

1

you can probably write a python or shell script using jenkins rest api

http://localhost:8080/jenkins/job/test/api/json

will get you all the builds

http://localhost:8080/jenkins/job/test/1/api/json 

will give you details of a particular build

Vikas Madhusudana
  • 1,482
  • 1
  • 10
  • 20