Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update Jenkins from a war file

I have a machine with Ubuntu 12.04 and have installed Jenkins ver. 1.424.6 using apt-get based on this guide, but there is a new version:

New version of Jenkins (1.447.2) is available for download (changelog). 

If I press download, I get a jenkins.war file... but how do I use that for upgrading my current installation? or is that not possible before the apt repositories gets updated?

like image 327
u123 Avatar asked Jun 16 '12 09:06

u123


People also ask

How do I update existing Jenkins?

To upgrade Jenkins without losing your data, download the latest jenkins. war file, copy it to /opt/bitnami/jenkins directory and restart Jenkins. It is recommended to create a backup of the previous jenkins.

How do I update Jenkins to latest version of Linux?

You can just copy the link to download from your Jenkins GUI, and go to command prompt, and use wget to download the war file. Note: If you've installed Jenkins as part of yum install, then you should do “yum update jenkins”, which will upgrade the war file accordingly.

How do I make Jenkins automatically update?

Jenkins can be upgraded from Manage Jenkins menu also just go to manage Jenkins option click on Upgrade Automatically. Once clicked on upgrade automatically option it will take us to the upgrade progress screen once completed it should success.


2 Answers

You can overwrite the existing jenkins.war file with the new one and then restart Jenkins.

This file is usually located in /usr/share/jenkins.

If this is not the case for your system, in Manage Jenkins -> System Information, it will display the path to the .war file under executable-war.

like image 51
bcmcfc Avatar answered Sep 28 '22 08:09

bcmcfc


#on ubuntu, in /usr/share/jenkins:  sudo service jenkins stop sudo mv jenkins.war jenkins.war.old sudo wget https://updates.jenkins-ci.org/latest/jenkins.war sudo service jenkins start 
like image 45
3z33etm Avatar answered Sep 28 '22 09:09

3z33etm