Set environment variables for a project, to be referenced during build steps. This plugin adds a section to job configuration pages for specifying key/value pairs of environment variables. These environment variables will be available to build steps in both freestyle and Maven projects, including the Ant, Maven, shell, and batch steps in freestyle projects. ChangelogVersion 1.2 (08/14/2011)
Version 1.1 (12/28/2009)
Version 1.0 (9/29/2009)
|
Setenv Plugin
Skip to end of metadata
Go to start of metadata
Comments (19)
Oct 12, 2009
Stefan Bäumler says:
Providing environment variables for a build is already realized by the (Hudson c...Providing environment variables for a build is already realized by the (Hudson core) job option "This build is parameterized" (see [HUDSON:Parameterized Build]). What is the difference between your plugin and the core functionality?
Oct 23, 2009
Stig Kleppe-Jørgensen says:
If you want a build to start automatically, like from an SCM or a dependency cha...If you want a build to start automatically, like from an SCM or a dependency change, you cannot use parameterized builds. Then this plugin is very good to have. In my case, I have some GUI tests that need an X11 display. As I have a cluster, it is very nice to just set the X11 display env.var. with this plugin and not have to do this for every node.
Oct 27, 2009
Stephen Callaghan says:
Is it possible to extend this to include "Post Build Actions" as well? Reason be...Is it possible to extend this to include "Post Build Actions" as well? Reason being is that we have clear case stream views that change everytime a new stream is created (about once a month). Currently i have to go into every single config area and update the new stream path , for example where the ant script is and in the Post Build in the Archive Area where I want to change where the artifacts will be.
Aug 03, 2011
Gregory Boissinot says:
The environment variables sets by the setEnv plug-in (or other similar plugin : ...The environment variables sets by the setEnv plug-in (or other similar plugin : envfile and envInject) are available in post-build actions.
However, for the clearcase plugin is a special case. The clearcase streams/baselines are display in the post-build actions section but they are executed in the prebuild method from the job lifecycle.
I suggest using the EnvInject plugin (https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin). It meets your needs and performs injection of environment variables before any job operations.
Dec 21, 2009
Craig Erdmann says:
I'm attempting to use the plugin to set variables based on other environmental v...I'm attempting to use the plugin to set variables based on other environmental variables. i.e.
CONTAINER = $WORKSPACE\container
TempHolder=$WORKSPACE\temp
Artifacts=$TempHolder/artifacts
How should I do this?
Thanks
Dec 22, 2009
Craig Erdmann says:
Figured it out: CONTAINER=${WORKSPACE}\\container TEMPHOLDER=${WORKSPACE}\\te...Figured it out:
CONTAINER=${WORKSPACE}\\container TEMPHOLDER=${WORKSPACE}\\temp ARTIFACTS=${TEMPHOLDER}\\artifactsI was missing the braces and double backslash (I'm assuming this is escaped??)
Jan 06, 2010
Carl Quinn says:
Try using forward slash instead of double backslash. That should work on Unix as...Try using forward slash instead of double backslash. That should work on Unix as well as Windows.
CONTAINER=$
/container
...
Apr 22, 2010
Jean-Luc Pinardon says:
It seems that the plugin cannot be used to pass parameter from an upstream to a ...It seems that the plugin cannot be used to pass parameter from an upstream to a downstream job. I mean from a job which triggers another one when it successfully ends.
Am I true, or have I missed something ?
Aug 03, 2011
Gregory Boissinot says:
You're right. To pass parameters from the upstream job to the downstream job, yo...You're right. To pass parameters from the upstream job to the downstream job, you have to use the Parameterized Trigger Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin).
May 25, 2010
Phillip Oldham says:
Its also not possible to create "dynamic" vars - i.e. calculate them at the poin...Its also not possible to create "dynamic" vars - i.e. calculate them at the point of creation:
This would be a very handy feature.
Aug 03, 2011
Gregory Boissinot says:
I agree. It will be an handy feature but we will have difficulty providing that ...I agree. It will be an handy feature but we will have difficulty providing that in a suitable way.
However, I suggest using the envInject plugin (https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin).
With this plugin, you can set this variable by executing a shell script (or a batch script in your case) at the set up of the job, fill in a Java properties file with this variable (and other) and the computed value. Then, you can inject properties in this new file as environment variables in a build step. With this configuration, you are able to use these environment variables in other build steps and in post-actions.
Jul 16, 2010
Axel Heider says:
What is the difference to the ToolEnvironment Plugin. It appears both do more or...What is the difference to the ToolEnvironment Plugin. It appears both do more or less the same.
Aug 08, 2011
Gregory Boissinot says:
SetEnv plugin or other equivalent plugins (envfile or envInject plugins) makes i...SetEnv plugin or other equivalent plugins (envfile or envInject plugins) makes it possible to add (or replace) environment variables.
ToolEnvironment plugin enables users to use logic names from location tools defined in the main page as environment variables.
Dec 19, 2010
tim jurik says:
I am unable to successfully use the env vars I create in the subsequent email.&n...I am unable to successfully use the env vars I create in the subsequent email.
I try both $VARNAME and "$
"
and neither get substituted. Am I out of luck with sending the emails?
(I use this for a single place to set a version number and it works fine int he batch processes but no good in the emails)
Aug 03, 2011
Gregory Boissinot says:
Could you raise an issue and attach your job configuration file (config.xml)?Could you raise an issue and attach your job configuration file (config.xml)?
Apr 15, 2011
wolfgang haefelinger says:
Where is the source code for this plugin?Where is the source code for this plugin?
Aug 03, 2011
Gregory Boissinot says:
The source code location has changed. The new location is https://github.c...The source code location has changed.
The new location is https://github.com/jenkinsci/setenv-plugin
Mar 08, 2012
Marc Günther says:
Could you add to the deprecation warning, that the new plugin actually migrates ...Could you add to the deprecation warning, that the new plugin actually migrates the existing configuration of this plugin. Very nice feature that, if only you would know it.
May 04, 2012
Gregory Boissinot says:
DoneDone
Add Comment