/hudson-war/src/main/webapp/env-vars.html
http://github.com/hudson/hudson · HTML · 77 lines · 58 code · 19 blank · 0 comment · 0 complexity · 793475a9bda93252a34b8bb93108d285 MD5 · raw file
- <html>
- <head>
- <title>Available Environmental Variables</title>
- <style type="text/css">
- dt { font-weight: bold; }
- </style>
- </head>
- <body>
- The following variables are available to shell scripts
- <dl>
- <dt>BUILD_NUMBER</dt>
- <dd>The current build number, such as "153"</dd>
- <dt>BUILD_ID</dt>
- <dd>The current build id, such as "2005-08-22_23-59-59" (YYYY-MM-DD_hh-mm-ss)</dd>
- <dt>JOB_NAME</dt>
- <dd>Name of the project of this build, such as "foo"</dd>
- <dt>BUILD_TAG</dt>
- <dd>String of "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Convenient to put into
- a resource file, a jar file, etc for easier identification.</dd>
- <dt>EXECUTOR_NUMBER</dt>
- <dd>The unique number that identifies the current executor
- (among executors of the same machine) that's
- carrying out this build. This is the number you see in
- the "build executor status", except that the number starts from 0, not 1.</dd>
- <dt>NODE_NAME</dt>
- <dd>Name of the slave if the build is on a slave, or "" if run on master</dd>
- <dt>NODE_LABELS</dt>
- <dd>Whitespace-separated list of labels that the node is assigned.</dd>
- <dt>JAVA_HOME</dt>
- <dd>If your job is configured to use a specific JDK, this variable is set to
- the JAVA_HOME of the specified JDK. When this variable is set, <tt>PATH</tt>
- is also updated to have <tt>$JAVA_HOME/bin</tt>.</dd>
- <dt>WORKSPACE</dt>
- <dd>The absolute path of the workspace.</dd>
- <dt>HUDSON_URL</dt>
- <dd>Full URL of Hudson, like <tt>http://server:port/hudson/</tt></dd>
- <dt>BUILD_URL</dt>
- <dd>Full URL of this build, like <tt>http://server:port/hudson/job/foo/15/</tt></dd>
- <dt>JOB_URL</dt>
- <dd>Full URL of this job, like <tt>http://server:port/hudson/job/foo/</tt></dd>
- <dt>SVN_REVISION</dt>
- <dd>For Subversion-based projects, this variable contains the revision number of the module.</dd>
- <dt>CVS_BRANCH</dt>
- <dd>For CVS-based projects, this variable contains the branch of the module.
- If CVS is configured to check out the trunk, this environment variable will not be set.</dd>
- <dt>HUDSON_USER</dt>
- <dd>Currently logged in user</dd>
- </dl>
- <p>
- To understand how environmental variables provided by Hudson can be utilized by
- Ant, study the following target:
- <pre><xmp
- ><target name="printinfo">
- <property environment="env" />
- <echo message="${env.BUILD_TAG}"/>
- </target></xmp></pre>
- </body>
- </html>