Skip to content

Instantly share code, notes, and snippets.

@xeraa
Last active December 10, 2015 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xeraa/4504389 to your computer and use it in GitHub Desktop.
Save xeraa/4504389 to your computer and use it in GitHub Desktop.
Using JCE in Cloudbee's Jenkins Builds

Adding JCE Support to OpenJDK Builds in Cloudbee's Jenkins

  1. Download the JCE extension from http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html

  2. Upload the files inside the archive to your private repository on Cloudbees forge ( /private/jce/ ) so that you have /private/jce/local_policy.jar,...

  3. On the Jenkins configuration page ([https://YourAccountName.ci.cloudbees.com/configure](https://.ci.cloudbees.com/configure) (use your real account name / subdomain) create a new JDK Installation and set JAVA_HOME to $HOME/openjdk6.unlimited (or any other version you want to use).

  4. Add a Pre Step and add the following shell script. First, it copies the JDK version you are using to your home folder. Second, it patches your copy - this should copy local_policy.jar and US_export_policy.jar. Be sure to use your real account name / subdomain.

     if [[ ! -d $HOME/openjdk6.unlimited ]] 
     then
         cp -Lr /opt/jdk/openjdk6.latest/ $HOME/openjdk6.unlimited
         cp -f /private/YourAccountName/jce/* $HOME/openjdk6.unlimited/jre/lib/security/
     fi
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment