Hi Christoph,

I use the plain Jenkins parameters for that, (checkmark for "This build is 
parameterized").
The parameters passed then appear inside the Groovy script as variables but 
not environment values.
If you need to set env value you can do the following inside your Groovy 
script:

env.MY_VAR = MY_VAR


Regards,
Timur

четверг, 5 февраля 2015 г., 12:30:11 UTC+3 пользователь Christoph 
Vogtländer написал:
>
> Hi, 
>
> I want to use the workflow plugin and together with the "Prepare an 
> environment for the run" feature provided by the EnvInject plug in. 
> Unfortunately, when setting key/value pairs the variables are not 
> available in the "env" workflow variable. 
> Parameters (Dynamic Parameter Plug-in) will not show up either. Please 
> note that this is not related to JENKINS-26050, I want to configure 
> parameters in the project itself and not triggering it from another job. 
>
> What I want to achieve is to have a common workflow stored in the SCM 
> (Groovy CPD DSL from SCM). Different workflow jobs should all use the 
> common workflow and be able to control behaviour (like checkout branch). 
>
> The only solution I can think of is to use "Groovy CPD DSL" (without 
> SCM), defining the variables I want and then using a workflow global 
> library from the internal Git repository. I would like to avoid that 
> because the workflow is for a specific task (e.g. nightly build) and 
> does not really belong in a global library. Maybe just a question of the 
> abstraction level... and personal preference. 
>
> Are there other possible solutions? 
>
> Christoph 
>
>

-- 
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/69ef6b1c-d2ba-49da-b2f6-54f800068a5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to