fix(ci): use compatible Jenkins job copy API
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import hudson.model.Items
|
||||
import jenkins.model.Jenkins
|
||||
import org.jenkinsci.plugins.workflow.job.WorkflowJob
|
||||
|
||||
@@ -27,7 +26,7 @@ serviceModules.each { service ->
|
||||
if (existing != null) {
|
||||
println "保留已有 Job: ${existing.fullName}"
|
||||
} else if (applyChanges) {
|
||||
def created = Items.copy(template, parent, jobName)
|
||||
def created = parent.copy(template, jobName)
|
||||
created.description = "${service} 服务开发环境独立构建与部署"
|
||||
created.save()
|
||||
println "已创建 Job: ${created.fullName}"
|
||||
|
||||
Reference in New Issue
Block a user