Skip to content

Commit

Permalink
Merge pull request #56 from pjdarton/implement_jenkins_20743
Browse files Browse the repository at this point in the history
Implements JENKINS-20743
  • Loading branch information
jswager committed Sep 22, 2016
2 parents f5c2d4c + 1af1b4a commit 666a5c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -45,6 +45,7 @@
import java.util.logging.Logger;

import jenkins.model.Jenkins;
import jenkins.slaves.JnlpSlaveAgentProtocol;

import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.DataBoundConstructor;
Expand Down Expand Up @@ -469,6 +470,10 @@ private EnvVars calculateVariablesForGuestInfo(final String cloneName, final Tas
addEnvVar(knownVariables, "JENKINS_URL", jenkinsUrl);
addEnvVar(knownVariables, "HUDSON_URL", jenkinsUrl);
}
final String slaveSecret = JnlpSlaveAgentProtocol.SLAVE_SECRET.mac(cloneName);
if (slaveSecret != null) {
addEnvVar(knownVariables, "JNLP_SECRET", slaveSecret);
}
addEnvVars(knownVariables, listener, Jenkins.getInstance().getGlobalNodeProperties());
addEnvVars(knownVariables, listener, this.nodeProperties);
addEnvVar(knownVariables, "NODE_NAME", cloneName);
Expand Down
Expand Up @@ -19,6 +19,7 @@
<tt>NODE_NAME</tt>,
<tt>NODE_LABELS</tt>.
</li>
<li>The value to be passed with the <tt>-secret</tt> argument if the slave is connecting via JNLP: <tt>JNLP_SECRET</tt>.</li>
<li>The following properties from this vSphere template definition:
<tt>cluster</tt>,
<tt>datastore</tt>,
Expand All @@ -27,7 +28,7 @@
<tt>remoteFS</tt>,
<tt>snapshotName</tt>,
<tt>targetHost</tt>,
<tt>templateDescription</tt>
<tt>templateDescription</tt>.
</li>
</ul>
</p>
Expand Down

0 comments on commit 666a5c4

Please sign in to comment.