Upgrading Jenkins is easy—you simply replace your local copy
file and restart
Jenkins. However you should make sure there are no builds running when you
restart your server. Since
your build environment configuration
plugins, and build history are stored in the Jenkins home directory,
upgrading your Jenkins executable will have no impact on your
installation. You can always check what version of
Jenkins you are
currently running by referring to the version number in the bottom
corner of every screen.
If you are running Jenkins as a stand-alone instance, you can also upgrade your Jenkins installation directly from the web interface, in the Manage Jenkins section. Jenkins will indicate if a more recent version is available, and give you the option to either download it manually or upgrade automatically (see Figure 3.10, “Upgrading Jenkins from the web interface” ).
Once Jenkins has downloaded the upgrade, you can also tell it to
restart when no jobs are running. This is probably
to upgrade Jenkins, although it will not work in all environments. In
particular, you need to be
running Jenkins as a stand-alone
and the user running Jenkins needs to have read-write access to the
are running Jenkins on an application server such as Tomcat
or JBoss, you might need to do a bit more tidying up when
Jenkins instance. Tomcat, for example, places compiled JSP pages in the
you upgrade your Jenkins version, these files need to be removed to
prevent the possibility of any
stale pages being served.
Any plugins you have installed will be unaffected by your Jenkins upgrades. However, plugins can also be upgraded, independently of the main Jenkins executable. You upgrade your plugins directly in the Jenkins web application, using the Jenkins Plugin Manager. We discuss plugins in more detail further on in this book.