Skip to content
Sam Gleske edited this page Feb 14, 2015 · 21 revisions

Welcome to the jervis wiki!

See the latest published Jervis API to assist with development.

There are currently two ways of using and configuring Jervis.

Development

To use Jervis to develop Jervis create a new freestyle project. This will be your seed job for development and testing.

Check This build is parameterized and create a new text parameter named project. The project parameter will by used by firstjob.dsl.groovy.

Set the Source Code Management to Git and clone the Jervis project (or your version of it).

Add a new Build step called Process Job DSLs. Configure the following settings.

  • DSL Scripts - jobs/**/*.groovy
  • Action for existing jobs and views - Ignore Changes should be unchecked.
  • Action for removed jobs - Ignore
  • Action for removed views - Ignore
  • Advanced
    • Context to use for relative job names - Seed Job
    • Additional classpath - src/main/groovy

When building the job the project parameter is the GitHub namespace/project. In my case, I set it to samrocketman/jervis to generate a job for the Jervis project.

Production

Jervis is a library. If you're going to run it in production you should build it into a Jar and include it in the Jenkins runtime classpath. You should also include the snakeyaml library in the Jenkins runtime classpath because the Jervis library depends on it. To create the jar do the following.

./gradlew build

Copy build/jervis.jar to your desired location. Generate the API documentation so that you may begin programming against it in your own Job DSL scripts.

./gradlew groovydoc

Use your own DSL scripts and configs

Jervis comes with comprehensive sample seed jobs and configs. Since Jervis will be running as a library from the classpath feel free to copy the sample seed jobs and configs into a separate repository and use them. Let's call this your DSL repository.

  • Sample seed jobs located in jobs/*.dsl.groovy
  • Sample configs located in src/main/resources/*.json

Configure your seed job similar to the Development version except configure it with your DSL repository.

Clone this wiki locally