python-jenkins get_job_info - how do I get info on more than 100 builds? -



python-jenkins get_job_info - how do I get info on more than 100 builds? -

i'm using python-jenkins api manage jenkins build servers. servers pretty loaded - scores of jobs , jobs have saved hundreds of builds.

a basic goal have utilize api build count each job, , total build count across jobs. here's code:

import jenkins jnk = jenkins.jenkins(myurl, myusername, mypassword) info = jnk.get_info() jobs = info['jobs'] totalbuildcount = 0 job in jobs: jobname = job['name'] jobinfo = jnk.get_job_info(jobname) builds = jobinfo['builds'] # never contains more 100 items print jobname + " build count: " + str(len(builds)) totalbuildcount += len(builds) print "total build count: " + str(totalbuildcount)

what find - unfortunately - builds array in job info dictionary never contains more 100 entries, if job has stored many more builds that.

have others seen limit, , there way around it, or api useless servers big archived build counts?

if utilize jenkinsapi instead:

from jenkinsapi.jenkins import jenkins jnk = jenkins(myurl, myusername, mypassword) totalbuildcount = 0 job in jnk.keys(): builds = jnk[job].get_build_dict() print job + " build count: " + str(len(builds)) totalbuildcount += len(builds) print "total build count: " + str(totalbuildcount)

python jenkins

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -