Description of problem: There are some Jenkins Plugins I need to install but they are not compatible with the ancient Jenkins version you are using. I hope we can get more frequent (or better automated) updates for Jenkins. Current Version: 1.509.1 (February 2013) Newest Version: 1.554.1 (May 2014)
We'd been waiting for a new LTS but it looks like one is available now that we can try. In the meantime, however, you can provide your own jenkins war file if you wish to run a newer version. To do so, scp the war into your gear and set the following environment variables: 1) JENKINS_JAR_CACHE_PATH=<OPENSHIFT_DATA_DIR>/.jenkins/cache/jars 2) JENKINS_WAR_PATH=/path/to/your/jenkins.war
So, I did scp the .war into /app-root/data/war/jenkins.war and set the war path. Checked it afterwards: > echo $JENKINS_WAR_PATH app-root/data/war/jenkins.war Set the cache path and checked it: > echo $JENKINS_JAR_CACHE_PATH app-root/data/.jenkins/cache/jars However, that folder does now exists and I can't create it by hand (permission denied). What am I doing wrong?
Forgot to mention that I restarted the CI through the the openshift interface 2 times but it still shows the old version.
1) You did an app restart of the jenkins application? Can you ssh into the gear and confirm that a) the JENKINS_WAR_PATH is still set b) ps axwww | grep java to confirm the war file path being used by the jenkins process 2) I'm not sure, i'm able to create that directory without issue after ssh'ing into my jenkins gear: [jenkins-bparees.dev.rhcloud.com 537bbf1852e31ae7fa000017]\> cd app-root/data/ [jenkins-bparees.dev.rhcloud.com data]\> mkdir -p .jenkins/cache/jars [jenkins-bparees.dev.rhcloud.com data]\> ls -l .jenkins/cache/jars total 0
1.a) Still set: > echo $JENKINS_WAR_PATH /var/lib/openshift/537b7f6b4382ece777000656/app-root/data/jenkins.war I tried both the absolute path (see above) and just /app-root/data/jenkins.war 1.b) Here comes the problem... It doesn't use my path. It's still using /usr/lib/jenkins/jenkins.war ps axwww | grep java 8221 pts/0 S+ 0:00 grep java 524239 ? Sl 0:22 /etc/alternatives/jre/bin/java -XX:+UseSerialGC -Xms20m -Xmx168m -XX:MaxPermSize=100m -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/openshift/537b7f6b4382ece777000656/app-root/data/ -Dhudson.slaves.NodeProvisioner.recurrencePeriod=500 -Dhudson.slaves.NodeProvisioner.initialDelay=100 -Dhudson.slaves.NodeProvisioner.MARGIN=100 -Dhudson.model.UpdateCenter.never=true -Dhudson.DNSMultiCast.disabled=true -jar /usr/lib/jenkins/jenkins.war --ajp13Port=-1 --controlPort=-1 --logfile=/dev/stdout --httpPort=8080 --handlerCountMax=45 --handlerCountMaxIdle=20 --httpListenAddress=127.3.6.1 2) Managed to fix that but that doesn't change anything.
how are you restarting the application? seems like it is not restarting (is the pid changing?)
Through the web ui: http://i.imgur.com/7wC4PE6.png The PID is changing but it always uses the default .war file instead of mine.
how did you set the env var?
I used the default way with "export".
that is why. you need to set it via openshift. From the command line, you can run "rhc set-env JENKINS_WAR_PATH=/path -a <your_app_name>"
Wow, I feel stupid now. Didn't know that I have to set env vars that way. Works! Sorry for wasting your time and thanks for explaining everything.
no problem, glad to help. we'll try to get jenkins updated shortly as well so you don't have to do this.