Practicalweb Ltd

Technical information on this site may be out of date : no updates since 2015

Jenkins publish over ssh - parameterized

April 18 2013 : posted under jenkins

To have a jenkins job which acts on a remote server via ssh - and has a parameter to choose which server(s) to use.

  1. check This build is parameterized
  2. Make the parameter name something like TARGET_SERVER
  3. add build step Send files or execute commands over SSH
  4. Add server
  5. In server details click advanced
  6. add a value for Label
  7. at the end of the ssh section check Parameterized publishing
  8. specify the Parameter name from earlier (TARGET_SERVER) Now when you run the job supply a value for the TARGET_SERVER parameter that can be a regex, the job will run the ssh sections on any servers that have a matching label.