blob: ef6ce0cd3d8688b652c6ee7b177248180354144c [file] [log] [blame]
package com.mirantis.mk
/**
*
* Jenkins common functions
*
*/
/**
* Get Jenkins job running builds
* @param jobName job name
* @return list of running builds
*/
@NonCPS
def getJobRunningBuilds(jobName){
def job = Jenkins.instance.items.find{it -> it.name.equals(jobName)}
if(job){
return job.builds.findAll{build -> build.isBuilding()}
}
return []
}