Jenkins : Glassfish


To install Jenkins on Glassfish, simply copy jenkins.war to $GLASSFISH_HOME/domains/domain1/autodeploy. Alternatively, you can do this from admin GUI. See this document for more about this.


You can upgrade your existing Jenkins by overwriting $GLASSFISH_HOME/domains/domain1/autodeploy/jenkins.war with a newer version. Again, you can also do this from the admin GUI by choosing to redeploy the application as illustrated below.


There are many ways to do this, but one way to do so is to configure Glassfish to run with the "JENKINS_HOME" system property. From the command line, do the following:

% ./asadmin create-jvm-options -DJENKINS_HOME=/path/to/jenkins_home

You can do the same from the admin GUI, as illustrated below:

This technique should be also used to increase the VM heap size, when your Jenkins gets big.

If you get confused or this doesn't work, just try to set JENKINS_HOME environment variable before launching Glassfish:

% export JENKINS_HOME=/path/to/jenkins_home
% ./asadmin start-domain

Glassfish needs to be restarted for this change to take effect.

Securing Jenkins

See the forum thread on this topic.

Relevant Issues

See the list of issues filed that are specifically marked relevant to Glassfish.

There is also a known issue on Glassfish Enterprise that causes some Jenkins pages to fail. To workaround this issue, use Hudson 1.360 or higher and start Glassfish with -Dhudson.util.Secret.provider=SunJCE . See section above for into on setting system properties.