An option you might like to explore is to use python-jenkins. We use it to automate folder and job creation. Doc is here: https://python-jenkins.readthedocs.org/en/latest/examples.html#example-7-working-with-jenkins-cloudbees-folders
On Thursday, August 20, 2015 at 12:22:19 PM UTC-7, Daniel Serodio wrote: > > I think Daniel Beck means that instead of calling > Jenkins.createProjectFromXML(...), you find the folder you want and then > call folder.createProjectFromXML(...) > > Regards, > Daniel Serodio > > On Thursday, August 20, 2015 at 1:17:37 PM UTC-3, Michel Leclerc wrote: >> >> Daniel, >> >> i'm experiencing the same exact problem with CreateProjectFromXML. Your >> answer seems to solution this problem. But i can't quite understand the >> meaning of your answer. Could you be more explicite? >> >> Thanks >> >> Michel Leclerc >> >> On Friday, February 28, 2014 at 3:23:58 PM UTC-5, Daniel Beck wrote: >>> >>> Folder#createProjectFromXML(String,InputStream). It's from the >>> ModifiableTopLevelItemGroup interface that both Jenkins and Folder >>> implement. >>> >>> On 28.02.2014, at 17:18, Glenn V <[email protected]> wrote: >>> >>> > Hi, >>> > >>> > I'm using the scriptler plugin to write a groovy script using the >>> Jenkins api, that will clone a set of jobs. With >>> jenkins.model.Jenkins.createProjectFromXML(String name, InputStream xml) I >>> can create new jobs just fine, but that only seems to create top level >>> items. >>> > >>> > Because I use the "Cloudbees Folder" plugin to structure my jobs I >>> would like to create the new jobs inside an existing folder. Is there a way >>> to do this? >>> > >>> > Any help appreciated, >>> > >>> > Glenn >>> > >>> > >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups "Jenkins Users" group. >>> > To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> > For more options, visit https://groups.google.com/groups/opt_out. >>> >>> -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d6c8d483-6e9a-4716-b607-24a3e81575aa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
