Have:
Jenkins job that needs to execute bash command and initialise variable locally:
GOOD_VARIABLE= command
SSH into remote host and execute another command with above variable
command ${GOOD_VARIABLE}...
Problem:
I know how to ssh into another machine and execute command there but how can I pass that local variable to remote host?
Tried but didn't work:
sounds like your problem is how to send a var through SSH.
You have a detailed answer there: https://unix.stackexchange.com/questions/299037/pass-variable-in-ssh
Don't forget the -T when using SSH through Jenkins!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.