How to update your Jenkins 2.176.x to 2.222.4 and java 8 to 11 in ubuntu 16.04 manually
This doc will tell you how to update your java to 11 and update Jenkins to version 2.222.4
-
Make sure the jenkins run in the quite mode
http://your_jenkins_url/quietDown
-
Disconect all of your agent
-
Stop the jenkins server
-
Make backup of your server and agent
-
Update the java 11 (in this case I use adpotopenjdk11)
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install -y apt-transport-https software-properties-common sudo apt-get install -y curl wget htop nano vim-tiny wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add - sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ sudo apt-get update sudo apt-get install -y adoptopenjdk-11-hotspot
-
Verify the java
java -version javac -version
If it's still using java8 you need to manually setup the java using alternatives
update-java-alternatives --list update-java-alternatives --set adoptopenjdk-11-hotspot-amd64
then check the java again
-
Relaunch the jenkins and make sure the pipelines runs well
-
Stop the jenkins server
-
Updates the jenkins.war
wget http://mirrors.jenkins.io/war-stable/2.222.4/jenkins.war
Backup your old jenkins.war
Then move the new jenkins.war into your jenkins.war folder
-
Update your all of your agent java (you can use the same method as master)
-
Relaunch the jenkins server
-
Update all of your plugins
-
Then make sure the pipeline is running well