Can you clarify this point:  "This generates two jobs named DSL_TEST_DSL1 and 
DSL_TEST_DSL2 as intended. It also adds the sidebar links plugin but the 
content of the links is the same in both jobs and is DSL2 twice instead of DSL1 
in job 1 and DSL2 in job 2."

The way it reads to me, and correct me if I have misinterpreted, is as follows.

Two jobs, named: 
DSL_TEST_DSL1
DSL_TEST_DSL2

Two links on the sidebar links plugin (I'm not familiar with this plugin), with 
the following text:
DSL_TEST_DSL1
DSL_TEST_DSL2.

The "content" is the same.  Does this mean the link takes you to the same URL?  
For example, http://jenkins.local/jobs/<job_name>/3, or whatever your build 
number is.

But, they are actually http://jenkins.local/jobs/DSL_TEST_DSL2DSL2/3 and 
http://jenkins.local/jobs/DSL_TEST_DSL2/3?

I don't think I'm processing that correctly.

Pete

On Jun 4, 2013, at 7:16 PM, Bill K <[email protected]> wrote:

> Hello, 
> 
> I am using job_dsl plugin to create jobs in a loop. We have several 'sets' of 
> code all of which will need an identical set of jobs. This is working fine 
> for things using the built in helpers but we also have a need to use some 
> plugins not directly supported. I have created configure blocks which enable 
> the plugins but variable substitution is not working within the configure 
> blocks. The last value of the loop is used in all cases. Ex; 
> 
> def FeatureSets = ['DSL1','DSL2'] 
> 
> for (i in FeatureSets) 
> { 
>    y=FeatureSets.indexOf(i) 
>    println "y=$y" 
>    job { 
>       name "DSL_TEST_${i}" 
> 
>       configure { project -> 
>          SideBarLinksNode = 
> project/'properties'/'hudson.plugins.sidebar__link.ProjectLinks' 
>          SideBarLinksNode/links/'hudson.plugins.sidebar__link.LinkAction'/url 
> << "${i}/index.html" 
>          
> SideBarLinksNode/links/'hudson.plugins.sidebar__link.LinkAction'/text << 
> "${i} Doxygen HTML" 
>          
> SideBarLinksNode/links/'hudson.plugins.sidebar__link.LinkAction'/icon << 
> "document.gif" 
>       } 
>    } 
> } 
> 
> This generates two jobs named DSL_TEST_DSL1 and DSL_TEST_DSL2 as intended. It 
> also adds the sidebar links plugin but the content of the links is the same 
> in both jobs and is DSL2 twice instead of DSL1 in job 1 and DSL2 in job 2. 
> 
> Any help would be greatly appreciated! 
> 
> Thanks
> 
> 
> -- 
> 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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to