Configure or Create hudson job automatically

前端 未结 7 511
猫巷女王i
猫巷女王i 2020-12-11 14:44

Is there any way to create new Hudson job by one more Hudson job based one previous Jobs?

For example if I need to create new bunch of jobs one by one, Automatically

相关标签:
7条回答
  • 2020-12-11 15:30
    def jenkins = hudson.model.Hudson.instance
    def template = jenkins.getItem("MyTemplate")
    def job = jenkins.copy(template,"MyNewJob")
    job.save()
    

    I used this now I have to change the parameter values of MyNewJob using Groovy how will I do that?

    ex I have a parameter called "Build_BranchName" and the default is //perforce/mybranch I have to change it to //perforce/mynewbranch

    0 讨论(0)
提交回复
热议问题