In this post, we will discover how do we upgrade the Jenkins software to the latest version in your Linux instance like Ubuntu, Debian, CentOS, and other Linux distros. By default, it is a very critical issue have to keep the Jenkins up-to-date with the latest version if you use it in a production environment. Instead of that, you should use the LTS release version always and be stable in nature. I will jump into the upgrade steps,
What is the Current Version:
First, log in to your Jenkins console window and scroll down to the right bottom corner, you can see the current version of your Jenkins.
Find Out WAR File Location:
Next, go to the system information page using the URL: https://192.168.10.20:8080/systemInfo (my instance IP address, you can use your domain or IP)
In my case, I have used Ubuntu instance so I found the executable-war file location in /usr/share/jenkins/jenkins.war, see the screenshot below,
In my case, I have used Ubuntu instance so I found the executable-war file location in /usr/share/jenkins/jenkins.war, see the screenshot below,
Download and Upgrade:
Stop the running Jenkins service using the command,
$ sudo service jenkins stop
or
$ sudo systemctl stop jenkins
$ sudo mv /usr/share/jenkins/jenkins.war /usr/share/jenkins/backup_jenkins.war_old
Download the latest Jenkins war file or you can use the specific version which you want to use the version.
$ sudo wget http://updates.jenkins-ci.org/latest/jenkins.war -O /usr/share/jenkins/jenkins.war
Run the Jenkins:
Now, start the Jenkins using the command below,
$ sudo service jenkins start
or
$ sudo systemctl start jenkins
Comments (0)