-
-
Save actionjack/3539a08bd59d598c9380 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// vim: set fenc=utf-8 ts=2 sts=2 sw=2 : | |
import jenkins.model.Jenkins | |
import groovy.json.JsonBuilder | |
def jenkins = Jenkins.instance | |
def ret = [:] | |
jenkins.items.each {item -> | |
def list = [] | |
item.builds.each {build -> | |
list.add( | |
number: build.number, | |
duration: build.duration, | |
timestamp: build.timestamp.timeInMillis | |
) | |
} | |
ret.put item.displayName, list | |
} | |
print new JsonBuilder(ret).toString() | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment