0
votes

I installed jenkins on ubuntu as described here: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

But this seems to be a rather old version: 1.424.6+dfsg-1

The latest version, according to http://pkg.jenkins-ci.org/debian/ is 1.574. The version 1.424 is from 2011. How can I install the newest version?

1
What is the output of apt-cache policy jenkins? Have you tried to do apt-get update followed by apt-get install jenkins?Salem
Thanks. The apt-cache policy showed me that the jenkins package was taken from an internal mirror and not from pkg.jenkins-ci.org/debian I disabled the internal mirrors and set the http_proxy, I removed all the old stuff, and then I got the latest version 1.574 with apt-get install jenkins.Gregor

1 Answers

0
votes

To test it out:

  1. Make sure Java works (if you can reach the Jenkins you installed with apt-get, it does)
  2. Remove or at least shut down the Jenkins you installed with apt-get (but leave dependencies, like Java!)
  3. Download the jenkins.war of desired version to a location of your choice, such as /home/desireduser/jenkins/
  4. Set environment variable: export JENKINS_HOME=/home/desireduser/jenkins
  5. as desireduser, run cd ~/jenkins ; java -jar jenkins.war

If you just want to test it out in a secure environment, you can do this with your own account. For shared use, you probably want to create user jenkins or something. But the point of above is, simply running Jenkins is very simple. Things get a bit more complicated and platform-dependent only, when you want it to start it automatically, etc.

To install it as daemon, there are docs.


Alternative way: install with apt-get, then just replace the jenkins.war file with newer version, and restart the service. Jenkins should take care of updating all the extra files. Disclaimer: I have not actually tested this, so I can't promise it actually works... better take backups of jobs, etc.