Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc about groovy script for automation #279

Open
dktodorov opened this issue Oct 22, 2019 · 10 comments
Open

doc about groovy script for automation #279

dktodorov opened this issue Oct 22, 2019 · 10 comments

Comments

@dktodorov
Copy link

Hello,

Can you update the script for automation, because it is outdated and launch_ssh is not working?

Maybe in the past constructor for DockerComputerSSHLauncher was able to accept SSHConnector, but now it looks like that it should be used DockerSSHConnector.

@KostyaSha
Copy link
Owner

Sorry, what script?

@KostyaSha
Copy link
Owner

Yes, sure. I think now jcasc could be added also!

@serbaniuliuscezar
Copy link

serbaniuliuscezar commented Oct 28, 2019

@KostyaSha Would also be very useful for me :)

@33man
Copy link

33man commented Nov 20, 2019

I just updated it to match new constructor of DockerSSHConnector => https://github.com/33man/yet-another-docker-plugin/blob/master/docs/script-console-scripts/configure-yadocker-cloud.groovy

@dktodorov
Copy link
Author

dktodorov commented Nov 20, 2019

@33man Sorry, but I try to use your code, but I have some issues, can you suggest where is my mistake?

import com.github.kostyasha.yad.commons.DockerSSHConnector
import com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher
import hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy


DockerSSHConnector sshConnector = new DockerSSHConnector(
  22,
  null,
  'yad-test',
  '',
  '',
  null,
  '',
  '',
  120,
  10,
  10,
  new NonVerifyingKeyVerificationStrategy()
)
launcher =  new DockerComputerSSHLauncher(sshConnector)

groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.github.kostyasha.yad.commons.DockerSSHConnector(java.lang.Integer, null, java.lang.String, java.lang.String, java.lang.String, null, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer, java.lang.Integer, hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy)

@33man
Copy link

33man commented Nov 20, 2019

Hello, which version of the plugin are you using ? I tested with latest 0.1.5

@dktodorov
Copy link
Author

I am using 0.1.4, I will try to update tomorrow.
Thank you

@33man
Copy link

33man commented Nov 21, 2019

Yep the 0.1.5 added new argument to the constructor:
Diff

@dktodorov
Copy link
Author

@33man thanks, you were right.
After update it is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants