Jenkins select a target and run SSH on that target

-1

Is there any way to select an option and run a remote code on that target? example: server1, server2 and server3; I select the server3 and connect to that server with the respective credentials to execute a bash; I have seen that there is the option of "Choise parameter" and "Send files or execute commands over SSH before the build starts" but I can not find how to link both since the second one is static selecting the SSH server name. I would appreciate any suggestion or guidance. Greetings.

    
asked by user3063479 09.01.2018 в 01:40
source

1 answer

0

I think I found a way: using a Choice parameter named 'TARGET' with the values of the servers as options, then in Build a "Conditional Step (multiple)" that compares two String: $ {TARGET} with the value of the name of the server, maybe there are more ways, for now I can continue: D

    
answered by 09.01.2018 в 02:11