Created
February 18, 2015 07:58
-
-
Save rodrigozrusso/3d7e31de720b2d0df006 to your computer and use it in GitHub Desktop.
Create jenkins job based on template (groovy)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def jenkins = hudson.model.Hudson.instance | |
def template = jenkins.getItem("MyTemplate") | |
def job = jenkins.copy(template,"MyNewJob") | |
job.scm = new hudson.scm.SubversionSCM("http://base/branches/mybranche") | |
job.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment