First, execute the command locally in Jenkins
The new project and git plug-ins in the same way, just choose the source control to use None, and then select the execute Shell module in the build , command to write the commands needed to execute
Ii. remote execution of commands in Jenkins
New project and git plugin in the same way, just select the source management using None, and then select Execute Shell script on remote host using SSH module in the build environment
1. Select the server on the SSH site that needs to be connected remotely
(1) The server selected here needs to be configured in advance in System Management .
System Management >> system setup
The password for the server can be added using the Add method
Test ssh to connect properly after adding finished
The successful connection appears to prove the connection was successful.
2.then the command to execute after the post Bulid script is written is the command that needs to be executed on the remote server
Jenkins-shell plug-in use