Michael Neale | 57de5eb | 2014-07-15 19:41:30 +1000 | [diff] [blame] | 1 | import hudson.model.*; |
| 2 | import jenkins.model.*; |
| 3 | |
Michael Neale | fe68374 | 2014-09-26 20:49:30 +1000 | [diff] [blame] | 4 | |
| 5 | Thread.start { |
| 6 | sleep 10000 |
| 7 | println "--> setting agent port for jnlp" |
Dmitry Gureev | 1a65016 | 2015-08-14 02:39:55 +0300 | [diff] [blame] | 8 | def env = System.getenv() |
| 9 | int port = env['JENKINS_SLAVE_AGENT_PORT'].toInteger() |
| 10 | Jenkins.instance.setSlaveAgentPort(port) |
Carlos Sanchez | beabf9a | 2015-08-10 17:25:39 +0200 | [diff] [blame] | 11 | println "--> setting agent port for jnlp... done" |
Michael Neale | fe68374 | 2014-09-26 20:49:30 +1000 | [diff] [blame] | 12 | } |