Description of problem: Set JENKINS_WAR_PATH to any other available value in pre_build or build action_hook. eg, copy the jenkins.war to /root/ and set the value to /root/jenkins.war. $ cat .openshift/action_hooks/pre_build #!/bin/bash JENKINS_WAR_PATH='/root/jenkins.war' export JENKINS_WAR_PATH='/root/jenkins.war' echo $JENKINS_WAR_PATH During the jenkins server building phase it will always use the default jenkins.war under /usr/lib/jenkins/. Version-Release number of selected component (if applicable): devenv_3616 How reproducible: always Steps to Reproduce: 1.Create jenkins server 2.Add pre_build action_hook with execute permission 3.Specify the JENKINS_WAR_PATH in the pre_build script cat .openshift/action_hooks/pre_build #!/bin/bash JENKINS_WAR_PATH='/root/jenkins.war' export JENKINS_WAR_PATH='/root/jenkins.war' echo JENKINS_WAR_PATH=$JENKINS_WAR_PATH 4.Git push 5.Check the jenkins server log $ rhc tail jenkins Actual results: The jenkins app will always use the /usr/lib/jenkins/jenkins.war when building. jenkins.log: Running from: /usr/lib/jenkins/jenkins.war webroot: System.getProperty("JENKINS_HOME") Aug 06, 2013 12:52:13 AM winstone.Logger logInternal INFO: Beginning extraction from war file Jenkins home directory: /var/lib/openshift/955786308154953985687552/app-root/data found at: System.getProperty("JENKINS_HOME") Aug 06, 2013 12:52:17 AM winstone.Logger logInternal INFO: HTTP Listener started: port=8080 Aug 06, 2013 12:52:17 AM winstone.Logger logInternal Expected results: User can specify the customized war for the JENKINS_WAR_PATH Additional info: In the control script, there are following lines if [ -z "$JENKINS_WAR_PATH" ]; then JENKINS_WAR_PATH=/usr/lib/jenkins/jenkins.war fi And the JENKINS_WAR_PATH can be printed out in the git push output. Total 4 (delta 0), reused 0 (delta 0) remote: Stopping jenkins cart remote: Waiting for stop to finish remote: Starting application jenkins remote: JENKINS_WAR_PATH=/root/jenkins.war remote: Starting jenkins cart remote: Waiting ... remote: Waiting ... remote: Still waiting ... To ssh://871880341879427059154944.rhcloud.com/~/git/jenkins.git/ 748bcc6..a39cab4 master -> master
I am not sure that pre_build ever worked for this use case. I am assuming it does based on the bug being opened. But I think you want to use pre_start_jenkins since otherwise the war you specify would only be used when you push to jenkins (which is a strange thing to do really). I tried using pre_start_jenkins and that seem to work fine. -Dan
As Dan said, this worked when set the war_path in pre_start_jenkins-1.4 script. remote: Stopping jenkins cart remote: Waiting for stop to finish remote: Starting application jenkins remote: JENKINS_WAR_PATH=/root/jenkins.war remote: Starting jenkins cart remote: Error: Unable to access jarfile /root/jenkins.war remote: Waiting ... remote: Waiting ... remote: Waiting ... Close this bug.