If you run Jenkins with java -jar jenkins.war, Jenkins will be able to update itself from the Manage Jenkins page. This is the simplest way to do automatic upgrades.
If you run Jenkins in other servlet containers, here is a simple set of steps to create a Jenkins job to semi-automate Jenkins Updates written by Rolf. The local paths need to be changed to reflect the individual setup configuration.
copywar.sh contains this:
The reason this in in a separate script with a nohup is so that the job can complete properly before Jenkins deployment begins. In Vista it needs to be set to "Run with highest Authority," but should have no trouble running in Windows XP.
This update procedure works, if you installed Jenkins from a Debian package (see http://weblogs.java.net/blog/kohsuke/archive/2008/06/debian_packages.html for more information):
If you install Jenkins as a Windows service, Jenkins will be able to update itself from the Manage Jenkins page. This is the simplest way to do it.
Alternatively, here is a similar script to the one above for Windows users. It is a batch file and can be setup as a scheduled task to update Jenkins on a regular schedule. This particular script keeps a backup of the most recent copy of jenkins.war in the same directory as the auto updater does. Because this script starts and stops the Jenkins service for you, it does require that it be run as an Administrator on Windows 2008 and above. It does delete the complete exploded war file from the deployment location, so be careful if you save any configuration files to that directory.
Skip to end of metadata Go to start of metadata