Deploying Jenkins CI on Pivotal Web Services
search cancel

Deploying Jenkins CI on Pivotal Web Services

book

Article ID: 294872

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

This article describes how to install Jenkins CI on PWS. This has been tested to work on PWS CF release v.193.

Environment


Resolution

  1. Get your manifest file from here: https://github.com/aladyzhensky/jenkins-files/blob/master/manifest.yml ensuring you have a unique hostname for your deployment. Please note that we are setting JENKINS_HOME environment variable as per https://wiki.jenkins-ci.org/display/JENKINS/Tomcat

  2. Use the following buildpack when deploying Jenkins CI: https://github.com/aladyzhensky/java-buildpack-jenkins.git. We needed to customize standard CF Java Buildpack to disable Spring Auto Configuration because Jenkins is using a legacy version of Spring which is not 100% compatible with the standard buildpack's Spring Auto Configuration.

  3. Expand your war file with ‘jar xvf your_war_file.war and edit META-INF/MANIFEST.MF. From this file, remove the line starting with Main (will be close to the top of the file). We need to remove the Main method from the MANIFEST.MF, so JENKINS is treated by PWS like a Tomcat app rather than pure Java app.

  4. Repackage your war file with ‘jar cvf your_war_file.war .’ It’s a good idea to remove old war file beforehand.

  5. cf push -b https://github.com/aladyzhensky/java-buildpack-jenkins.git



Additional Information

Important: The configured Jenkins instance needs to be configured with permanent storage such as AWS S3 so the data persists between Jenkins restarts.