Nevermind - just needed to use Jenkins.instance and then I could do 
myinstance.setSlaveAgentPort(<int>)

On Friday, February 15, 2013 9:04:57 PM UTC-5, Maven User wrote:
>
> Hi all - 
>
> I'm trying to set the "slaveAgentPort" (as it is known in the config.xml) 
> via the script console and I'm struggling a bit.
>
> I'm trying this:
>
> myinstance = Hudson.instance
>   
> println(  myinstance.tcpSlaveAgentListener.configuredPort)
>   
> if (myinstance.tcpSlaveAgentListener.configuredPort == 33333)
> {
>   println("equals")
>
> }
> else
> {
>   println("not equals")
>   tcpSlaveAgentListener = new TcpSlaveAgentListener(33333)
>   myinstance.save()
> }
>
> What's weird is I can see that a thread is started and listening away at 
> this new port, but when I go into the global config settings, I don't see 
> it configured there.
>
> Is there some kinda of other method I need to call to set this property?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to