Update from Jenkins

Asked

Viewed 544 times

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, it does not specify the update procedure. In Stackoverflow research in English, I only found old answers (2012, 13, 14), in which I even had official documentation of how to do it (but the current version goes into 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 way. If anyone knows if this is a correct procedure or if there are others, thank you!

2 answers

1


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

It is a simple process, just swap the . War for the newer version. If Jenkins is not installed as a service, just go to the browser and put a /restart at the end of the base Jenkins URL

1

Another way, beyond this of the answer I accepted is to follow the path as if to install again, described in https://pkg.jenkins.io/debian-stable/ (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 problems.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.