specific revision or tag as described for Subversion in Section 10.2.4, “Building from a Subversion Tag”
and for Git in Section 10.2.5, “Building from a Git Tag”. Then, once you have the source code in your
Jenkins workspace, you simply need to deploy it onto the target server.
A useful tool for this sort of deployment is the Publish Over series of plugins for Jenkins (Publish Over
FTP, Publish Over SSH, and Publish Over CIFS). These plugins provide a consistent and flexible way
to deploy your application artifacts to other servers over a number of protocols, including CIFS (for
Windows shared drives), FTP, and SSH/SFTP.
The configuration for each of these plugins is similar. Once you have installed the plugins, you need
to set up the host configurations, which are managed centrally in the main configuration screen. You
can create as many host configurations as you like—they will appear in a drop-down list in the job
configuration page.
Configuration of the hosts is fairly self-explanatory (see Figure 12.13, “Configuring a remote host”).
The name is the name that will appear in the drop-down list in the build job configurations. You can
configure authentication using a username and password for FTP, or either an SSH key or a username
and password for SSH. You also need to provide an existing directory on the remote server that will act
at the root directory for this configuration. In the Advanced options, you can also configure the SSH
port and timeout options.
Figure 12.13. Configuring a remote host