Never mind....figured it out (keep in mind this requires the SSH Slaves
plugin):
import hudson.slaves.DumbSlave
import hudson.plugins.sshslaves.SSHLauncher
def jenkins = jenkins.model.Jenkins.instance
def launcher = new SSHLauncher(...)
def slave = new DumbSlave("test slave", "/home/jenkins", launcher)
jenkins.getNodesObject().addNode(slave)
On Wednesday, July 6, 2016 at 3:02:59 PM UTC-7, James Hardwick wrote:
>
> Hi everyone,
>
> I was hoping somebody here might be able to point me in the right
> direction with regards to launching new SSH slaves via the java API. The
> javadocs just aren't very clear in this regard and I'm having a heck of a
> time figuring this out. Not having any luck finding prior examples of this
> either.
>
> I'm not interested in using the CLI or REST API. This is being done via a
> Pipeline groovy script.
>
> Cheers,
> James
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/5a2dad2c-c8bb-43dd-994c-c1567ab1e65b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.