blob: db8aae29ab567d85c51219e82ba4ef87003246fa [file] [log] [blame]
Michael Neale57de5eb2014-07-15 19:41:30 +10001import hudson.model.*;
2import jenkins.model.*;
3
Michael Nealefe683742014-09-26 20:49:30 +10004
5Thread.start {
6 sleep 10000
7 println "--> setting agent port for jnlp"
Dmitry Gureev1a650162015-08-14 02:39:55 +03008 def env = System.getenv()
9 int port = env['JENKINS_SLAVE_AGENT_PORT'].toInteger()
10 Jenkins.instance.setSlaveAgentPort(port)
Carlos Sanchezbeabf9a2015-08-10 17:25:39 +020011 println "--> setting agent port for jnlp... done"
Michael Nealefe683742014-09-26 20:49:30 +100012}