I ran into this same problem, and stumbled onto a solution. You have to
include the "view {}" block inside the each. I'm not a groovy expert, so I
can't say why this works exactly, but it does prevent it from generating
entirely separate nestedview definitions.
https://gist.github.com/kyounger/
Since the job-dsl only creates at the root level I let a new view be
created at the root level then wrote a Groovy script to move it.
I basically serialise both the existing view and the new view using the
writeXml method on View. This strips out the owner. I then use XmlParser to
add the corre
You can use the Job DSL Plugin to generate jobs and views very easily.
Highly recommended method of creating jobs and/or views required for
dynamic projects.
The View DSL reference is here:
https://github.com/jenkinsci/job-dsl-plugin/wiki/View-Reference
If the views you'd like to create are not
I have a matrix of n projects building on m branches, and I am putting together
pipelines for each one. That is, there are a set of jobs of the form
"regression tests for branch FOO of project BAR". I have a JSON file showing
the list of branches, projects, and their configurations. With that