Add new credential with ssh private key. Creation of this private key described in the github repository. Go to the Jenkins main menu -> Press Credentials -> (global)
Press Add Credentials -> Select SSH Username with private key -> Enter username jenkins -> Select Private key and enter Key from github repo folder -> Enter ID and Description and press OK button
Go to the Jenkins main menu -> Manage Jenkins -> Manage Nodes -> Then press New Node
Enter name of slave and select Permanent Agent and then press OK button
Enter some name and Description -> Select execution count -> Enter home directory for Jenkins which we created from provisioning code -> Enter label name for this slave server -> Execute this slave when selected this label ‘sshslaves‘ -> Launch via SSH -> Enter slave IP address -> auto accept key and press Save button
Go to create new Jenkins slave node 2. But this time copy from the first one.
Change Description, IP address, and press to Save button:
Look at the node list:
Create some project and test result. Enter label expression to filter in which slaves this job will b executed.
Add some Shell execution command
Result of the execution of command: