提交 1cc19f0e 编写于 作者: K kohsuke

add NODE_LABELS environment variables

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33836 71c3de6d-444a-0410-be80-ed276b4c234a
上级 18ed9667
......@@ -1658,6 +1658,9 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
Executor e = (Executor) t;
env.put("EXECUTOR_NUMBER",String.valueOf(e.getNumber()));
env.put("NODE_NAME",e.getOwner().getName());
Node n = e.getOwner().getNode();
if (n!=null)
env.put("NODE_LABELS",Util.join(n.getAssignedLabels()," "));
}
return env;
......
......@@ -28,6 +28,12 @@
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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册