In this short article, we will learn how to upgrade Jenkins to latest version. Log in to your Linux machine and let's get started.
Stop Jenkins service
First, we need to stop the Jenkins service. Run the following command to stop the Jenkins service.
1
sudo systemctl stop jenkins
Change work directory
Change working directory to the Jenkins war file location. Run the following command to change the working directory.
1
cd /usr/share/java
Some times, the Jenkins war file location will be different. You can find the Jenkins war file location from Jenkins System Information page by using the URL: https:/your-dns-name:8080/systemInfo.
Backup Jenkins war file
Before upgrading Jenkins, it is a good practice to backup the Jenkins war file. Run the following command to backup the Jenkins war file.
1
sudomv jenkins.war jenkins.war_old
Download Jenkins war file
Now, we need to download the latest Jenkins war file. Run the following command to download the latest Jenkins war file.
Now, we need to start the Jenkins service. Run the following command to start the Jenkins service.
1
sudo systemctl start jenkins
Conclusion
In this article, we learned how to upgrade Jenkins to latest version. I hope you enjoyed this article. If you have any issue regarding this tutorial, mention your issue in the comment section or reach me through my E-mail.