Re: How should I update Java code for add one slave node?

2019-03-03 Thread Mark Waite
Since your test is using JenkinsRule, I believe the JenkinsRule.createSlave() method will return a DumbSlave without requiring that you use SSHLauncher and without requiring that you have access to a computer at the specific IP address embedded in the test. Is there a specific reason that your

Re: How should I update Java code for add one slave node?

2019-03-03 Thread 田欧
Thanks @Mark I don't need to set jenkins master node address? 在 2019年3月1日星期五 UTC+8下午8:46:44,田欧写道: > > I'm using `ssh-slaves-plugin` and write some codes, like the below: > > @RequestMapping(value = "/test", method = RequestMethod.GET) > public Map test() { > Map result = new HashMap<>(); >

Re: How should I update Java code for add one slave node?

2019-03-01 Thread Mark Waite
The ssh agents use secure shell to connect. The secure shell uses private key / public key pairs to perform the connection. Your example is trying to use a username / password credential when it needs to use a private key credential. We use a technique like below from a system groovy script to

How should I update Java code for add one slave node?

2019-03-01 Thread 田欧
I'm using `ssh-slaves-plugin` and write some codes, like the below: @RequestMapping(value = "/test", method = RequestMethod.GET) public Map test() { Map result = new HashMap<>(); // username is my jenkins user // password is my jenkins password UsernamePasswordCredentialsImpl