14 lines
360 B
Groovy
14 lines
360 B
Groovy
import jenkins.branch.MultiBranchProject
|
|
import jenkins.model.Jenkins
|
|
|
|
def jenkins = Jenkins.instance
|
|
if (jenkins == null) {
|
|
return
|
|
}
|
|
|
|
def legacy = jenkins.getItemByFullName('titan-iac-quality-gate')
|
|
if (legacy != null && !(legacy instanceof MultiBranchProject)) {
|
|
legacy.delete()
|
|
println("Deleted legacy job titan-iac-quality-gate (non-multibranch)")
|
|
}
|