this is not as simple as it sounds.

first off a disclaimer CloudBees (my employer) as a proprietary feature that 
does this.

the reason it is not simple is each job type may have special folders.  then 
you have builds which again may have artifacts may have special files etc 
etc...  trust me there is a lot of edge cases.

if you can simplify things (if the source has builds the destination will have 
the same builds) then you can do some tricks copying in the same Jenkins 
instance.
firstly the job structure is *normally* job/name so you can recursively copy 
the folder job/foldername.  to job/dest/job/folder name

then you need to tell the parent it has a new child by loading the XML 
https://javadoc.jenkins.io/jenkins/model/ModifiableTopLevelItemGroup.html#createProjectFromXML-java.lang.String-java.io.InputStream-

alternatively you can copy the jobs recursively
 
https://javadoc.jenkins.io/jenkins/model/ModifiableTopLevelItemGroup.html#copy-T-java.lang.String-

or you could become a customer of cloudbees :)

you could possibly also somehow use jobDSL with the seed jobs (but I have never 
used that)

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c586b3e0-8fa5-4d6e-9251-954a288af9a3%40googlegroups.com.

Reply via email to