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/83134869ea523b3661f0
Hope that helps, even months later now. :)
-Kenny
On Tuesday, November 25, 2014 at 3:50:42 PM UTC-6, Rob Mandeville wrote:
>
> 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, I’ve developed an intricate system to regenerate all the jobs with no
> problem. Now, I just need to generate several dozen views.
>
>
>
> The hierarchy which I have been building by hand is:
>
>
>
> · (Nested View) Branch Builds
>
> o (Monitor View) All Builds for Branch FOO
>
> o (Monitor View) All Regression Tests for Branch FOO
>
> o (Nested View) Regression Pipelines for Branch FOO
>
> § (Build Pipeline View) Regression Pipeline for Branch FOO Project BAR
>
> § (Build Pipeline View) Regression Pipeline for Branch FOO Project QUX
>
> § …
>
> o (Build Pipeline View) Builds for Branch FOO Project BAR
>
> o (Build Pipeline View) Builds for Branch FOO Project QUX
>
> o …
>
>
>
> This is no longer scalable, and I’m wearing out my mouse button.
>
>
>
> I have been trying to use the Job DSL Plugin to handle this, to no avail.
> It has no support for monitor views, and when I try to nest nested views
> inside each other, the views all end up at the top level, making the tab
> bar ridiculously long.
>
>
>
> Is there a plugin I can use, a technique you know of, or even a way to
> insert views via XML without rebooting the Jenkins server?
>
>
>
> Thanks in advance,
>
>
>
> --Rob
>
>
>
> ------------------------------
> This e-mail and the information, including any attachments it contains,
> are intended to be a confidential communication only to the person or
> entity to whom it is addressed and may contain information that is
> privileged. If the reader of this message is not the intended recipient,
> you are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited. If you have received this
> communication in error, please immediately notify the sender and destroy
> the original message.
>
> Thank you.
>
> Please consider the environment before printing this email.
>
--
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/9dd4bd75-358c-4cce-8121-0bd41499133e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.