We're deploying our application using SSH scripts. For the production stage we need to figure out which out of two clusters is currently active. This can only be achieved reliably by running a command on a remote host and interpreting its output. Unfortunately there's no SSH plugin that does that AFAIK.
They only seem to be able to interpret if the SSH script return value was different from zero.
Currently I only see two undesirable solutions:
- use SSH in a script like Python, Groovy, etc. (means, we would have to provide SSH authentication to it somehow)
- Let the SSH-command write to a file, that is then copied to Jenkins and interpreted there (unelegant and cumbersome)