Now, we will edit the Jenkins job which we created earlier. As the output of the continuous integration step, we get my-app-1.0-SNAPSHOT.jar created in our Jenkins workspace. To deploy this JAR on our test server, we are going to use a simple Jenkins plugin called Publish Over SSH. This plugin allows us to transfer files to a remote server and run commands as well. First we need to set up an SSH private key on the Manage Jenkins page. Go to Manage Jenkins | Configure System and provide the following information:
- Passphrase: Provide a passphrase for the key (leave it blank if not encrypted)
- Path to key: The path to the key can be absolute, or relative to $JENKINS_HOME
- Key: If the ...