Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import jenkins.model.Jenkins
- import java.util.concurrent.TimeUnit
- String findRunningPipelineJobs() {
- Jenkins.instance.getComputer('').getOneOffExecutors().collect {
- "${Jenkins.instance.rootUrl}${it.currentExecutable.url} | ${TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis() - it.currentExecutable.startTimeInMillis)}"
- }.join('\n')
- }
- println findRunningPipelineJobs()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement