Jenkins Update

0

I have Jenkins installed on a server with Debian 8. I would like to know the correct procedure for updating the version. In the current documentation, you do not specify the update procedure. In a survey on StackOverFlow in English, I only found old answers (2012, 13, 14), where I even had official documentation on how to do it (but the current version goes to the installation documentation). I believe it would work by command:
sudo apt-get upgrade jenkins

But I'm not sure if it's the best way or the right one. If anyone knows if this is a correct procedure or if there are others, thank you!

    
asked by anonymous 19.07.2018 / 22:18

2 answers

0
wget    http://updates.jenkins-ci.org/latest/jenkins.war
cp jenkins.war /usr/lib/jenkins
systemsctl stop jenkins
systemsctl start jenkins

It's a simple process, just change the .war to the newer version. If jenkins is not installed as a service, just go to the browser and put /restart at the end of jenkins's base URL

    
19.07.2018 / 22:36
0

Another way, besides this one of the answer I accepted is to follow the path of how to install again, described in link (specific to debian / ubuntu).

First add this key to the system:

    wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

Then go to /etc/apt/sources.list with your text editor (I use vim or nano) with sudo and add the following line to the file:

    deb https://pkg.jenkins.io/debian-stable binary/

And finally, the commands for installation:

    sudo apt-get update
    sudo apt-get install jenkins

So I was able to update without any problems. Hope it helps!

    
27.11.2018 / 17:41