Re: Jenkins Pipeline/Workflow node name as variable

2016-03-21 Thread Eric Pyle
It looks like the word 'ENVIRONMENT' is misspelled in the stacktrace - not sure if this is the problem. The stacktrace indicates the error occurs on line 56 of your script, so it would help to know what is on that line. Eric On 3/21/2016 5:48 AM, Frank Hask wrote: @Baptiste When i use this

Re: Jenkins Pipeline/Workflow node name as variable

2016-03-21 Thread Frank Hask
Dana četvrtak, 17. ožujka 2016. u 13:23:22 UTC+1, korisnik Frank Hask napisao je: > > Hi all, i am building pipeline on my project that uses 5 DB servers. > > So based on build parameter i want to set node name. Like this.. > > env.NODE = ${blabla} > > > node('${NODE}') { > //some code > } > >

Re: Jenkins Pipeline/Workflow node name as variable

2016-03-21 Thread Frank Hask
@Baptiste When i use this method i am also getting errors.. def NODE = 'bla bla' node(NODE){ //some code } I get the following stacktrace groovy.lang.MissingPropertyException: No such property: ENVIRONMNET for class: WorkflowScript at org.codehaus.groovy.runtime.ScriptBytecode

Re: Jenkins Pipeline/Workflow node name as variable

2016-03-21 Thread Frank Hask
Baptiste thank you for reminding me to try out this method. I will give it a try.. -- 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...@

Re: Jenkins Pipeline/Workflow node name as variable

2016-03-19 Thread Baptiste Mathus
Inline Le 17 mars 2016 1:23 PM, "Frank Hask" a écrit : > > Hi all, i am building pipeline on my project that uses 5 DB servers. > > So based on build variable i want to set node name. Like this.. > > env.NODE = 'blabla' > > > node('${NODE}') { > //some code > } Why don't you just do: def nodeL

Re: Jenkins Pipeline/Workflow node name as variable

2016-03-19 Thread Vincent Latombe
Use double quotes if you want expressions resolved. Vincent 2016-03-17 13:23 GMT+01:00 Frank Hask : > Hi all, i am building pipeline on my project that uses 5 DB servers. > > So based on build variable i want to set node name. Like this.. > > env.NODE = 'blabla' > > > node('${NODE}') { > //som

Jenkins Pipeline/Workflow node name as variable

2016-03-19 Thread Frank Hask
Hi all, i am building pipeline on my project that uses 5 DB servers. So based on build variable i want to set node name. Like this.. env.NODE = 'blabla' node('${NODE}') { //some code } but each time i get error - There are no nodes with the label ‘${NODE}’ Thanks for help in advance... --