Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins SSH plugin: Parameterizing remote host

In Jenkins, I am using SSH Plugin to run shell commands on a remote machine via ssh. I have added my SSH sites to global configuration. But under "Execute shell script on remote host using ssh" section of my Jobs configuration, instead of just selecting one of the SSH sites from the drop down, I would like to consume a build parameter. This way I would like to generalize this job to remote to different environments depending on my requirements.

Is there a way to parameterize ssh site drop down? Or achieve my requirement in a different way?

BTW one option I already have is, to have ssh to remote machine as part of the script and execute it there.

like image 696
vkumars Avatar asked Sep 27 '22 11:09

vkumars


1 Answers

It is possible to parameterize the SSH server. Refer this post for details.

like image 133
James Selvakumar Avatar answered Sep 30 '22 07:09

James Selvakumar