Last active
August 29, 2015 13:55
-
-
Save njt1982/8782741 to your computer and use it in GitHub Desktop.
List Jenkins job build count from command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd /var/lib/jenkins/jobs | |
find . -mindepth 1 -maxdepth 1 -type d -print0 | while read -d $'\0' f; do C=`find "$f/builds/" -maxdepth 1 -type d | wc -l`; echo "${C} ${f}"; done | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful when teamed up with http://superuser.com/questions/589528/how-do-i-delete-the-builds-11-to-1717-in-jenkins to delete jobs in a project which hasn't had log rotation enabled and has got slightly out of control.