pbaranski
pbaranski

Reputation: 24962

Jenkins - get all jobs run in particular day

How can I get via Jenkins view/API all jobs run in given day?

/jenkins/view/All/builds shows random number of builds (after refreshing the number of historic builds change from 600 to 800 builds), for me this is history from 22 days but I need more than that.

I know that I can get history for given job (Jenkins: Get build numbers range on a particular day) but I need aggregated result for all jobs at once - best narrowed to particular day.

Upvotes: 6

Views: 15057

Answers (3)

Rahul Kamboj
Rahul Kamboj

Reputation: 61

You can see that in build history for last 11 days, it is showing to me, i just needed for last 24 hrs. Though i tried, "Install global-build-stats plugin", but this is not giving me correct data, showing only 4 jobs, may be the reason that i have just installed it now, without restart & It would not be in proper snyc with all jobs yet.

enter image description here

Upvotes: 1

vishal sahasrabuddhe
vishal sahasrabuddhe

Reputation: 768

Install global-build-stats plugin. This plugin will enable you to create graphs as per your need like daily, hourly, weekly, monthly etc. Check it here, it is the first plugin described.

Once you have graph is ready, you can get list of jobs for given time period. You can even click on graph and get the details, here is the sample URL after clicking graph:

http://jenkins.corp.com/plugin/global-build-stats/buildHistory?jobFilter=ALL&start=1438713014676&end=1438799414676&successShown=true&failuresShown=false&unstablesShown=false&abortedShown=false&notBuildShown=false&nodeFilter=ALL&launcherFilter=ALL

URL above will display Successful jobs (You can change it in the url for fail like failuresShown=true) for given time.

Upvotes: 5

Stefan Sprenger
Stefan Sprenger

Reputation: 1080

  1. I would try to keep my builds with this Build-Keeper plugin

    With this I could ensure that my builds won't be deleted.


  1. The next step would be to create a "date to look" groovy script by modifying this -> script

Upvotes: 2

Related Questions