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
| def JOB_NAME=env.JOB_NAME | |
| def job = jenkins.model.Jenkins.instance.getItemByFullName(JOB_NAME) | |
| def results=[:] | |
| println("Getting all build for ${JOB_NAME}") | |
| def abortedJobs= job.builds.findAll{ it.result ==hudson.model.Result.ABORTED} | |
| def jurl= Jenkins.getInstance().getRootUrl() | |
| def output = "" | |
| abortedJobs.each{run-> | |
| def buildNumber = run.getNumber() | |
| def buildTime =run.time |