PageRenderTime 14ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 1<html>
 2<head>
 3    <title>Available Environmental Variables</title>
 4    <style type="text/css">
 5        dt { font-weight: bold; }
 6    </style>
 7</head>
 8<body>
 9    The following variables are available to shell scripts
10
11<dl>
12    <dt>BUILD_NUMBER</dt>
13    <dd>The current build number, such as "153"</dd>
14
15    <dt>BUILD_ID</dt>
16    <dd>The current build id, such as "2005-08-22_23-59-59" (YYYY-MM-DD_hh-mm-ss)</dd>
17
18    <dt>JOB_NAME</dt>
19    <dd>Name of the project of this build, such as "foo"</dd>
20
21    <dt>BUILD_TAG</dt>
22    <dd>String of "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Convenient to put into
23        a resource file, a jar file, etc for easier identification.</dd>
24
25    <dt>EXECUTOR_NUMBER</dt>
26    <dd>The unique number that identifies the current executor
27        (among executors of the same machine) that's
28        carrying out this build. This is the number you see in
29        the "build executor status", except that the number starts from 0, not 1.</dd>
30
31    <dt>NODE_NAME</dt>
32    <dd>Name of the slave if the build is on a slave, or "" if run on master</dd>
33
34    <dt>NODE_LABELS</dt>
35    <dd>Whitespace-separated list of labels that the node is assigned.</dd>
36
37    <dt>JAVA_HOME</dt>
38    <dd>If your job is configured to use a specific JDK, this variable is set to
39        the JAVA_HOME of the specified JDK. When this variable is set, <tt>PATH</tt>
40        is also updated to have <tt>$JAVA_HOME/bin</tt>.</dd>
41
42    <dt>WORKSPACE</dt>
43    <dd>The absolute path of the workspace.</dd>
44
45    <dt>HUDSON_URL</dt>
46    <dd>Full URL of Hudson, like <tt>http://server:port/hudson/</tt></dd>
47
48    <dt>BUILD_URL</dt>
49    <dd>Full URL of this build, like <tt>http://server:port/hudson/job/foo/15/</tt></dd>
50
51    <dt>JOB_URL</dt>
52    <dd>Full URL of this job, like <tt>http://server:port/hudson/job/foo/</tt></dd>
53
54    <dt>SVN_REVISION</dt>
55    <dd>For Subversion-based projects, this variable contains the revision number of the module.</dd>
56
57    <dt>CVS_BRANCH</dt>
58    <dd>For CVS-based projects, this variable contains the branch of the module.
59        If CVS is configured to check out the trunk, this environment variable will not be set.</dd>
60
61    <dt>HUDSON_USER</dt>
62    <dd>Currently logged in user</dd>
63</dl>
64
65
66<p>
67To understand how environmental variables provided by Hudson can be utilized by
68Ant, study the following target:
69
70<pre><xmp
71><target name="printinfo">
72  <property environment="env" />
73  <echo message="${env.BUILD_TAG}"/>
74</target></xmp></pre>
75
76</body>
77</html>