Contents
DIFFERENT METHODS OF UPGRADING JENKINS
Upgrade prerequisite
Method to check currently installed Jenkins version
Methods available to update Jenkins
Upgrading using Jenkins yum update command
Upgrading using by downloading the war file
Upgrading Jenkins from Manage Jenkins
DIFFERENT METHODS OF UPGRADING JENKINS
On production environment it’s very important the Jenkins remains updated with so that it gets all it’s required security updates/patches time to time.
We should use always the LTS release over production environment as they are long term releases and are stable.
There are different mechanism available to upgrade the Jenkins server and can be chooses as per the infrastructure availability.
Upgrade prerequisite:-
- Make sure we have already taken backup of existing jenkins server
- Check the existing Jenkins version currently present
Method to check currently installed Jenkins version
- Using the JENKINS-CLI command, go to the location under which Jenkins-CLI is present and execute this command.
java –jar jenkins-cli.jar –s https://localhost:8080/ version
So here we can see the current version is 2.190.3
- Using the web UI login to Jenkins and scroll to bottom right of the screen there also we can see the current Jenkins version.
Methods available to update Jenkins
Upgrading using Jenkins yum update command
- In-case we have configured/install the Jenkins as sudo yum command then we can use the same sudo command to update the Jenkins version.
command to update Jenkins sudo yum update jenkins
This command will fetch out all the updates and prompt us to whether we want to install the updates or not just press the option Y
Once Y option is chosen to install the updates it will start fetching the updates and finally it will update it update Jenkins to the latest version as shown below here it is upgraded to latest version i.e. 2.222.3-1.1
Upgrading using by downloading the war file
Jenkins can be upgraded by downloading the war file also for this go to the location where Jenkins.war file resides and then get the download the link required version war file from http://mirrors.jenkins.io/war-stable/
Before this please take the backup of existing Jenkins war file.
Once the specific version Jenkins war file is downloaded we can restart Jenkins and it should take the updated Jenkins version now.
Upgrading Jenkins from Manage Jenkins.
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.
Once update we can see the Jenkins version as per any of the method mentioned earlier.
So we can see Jenkins has been upgraded from 2.19 to 2.222… Version.