Skip to content

Quickstart

Sam Gleske edited this page Mar 29, 2015 · 13 revisions

This is meant to get you up and running real quick to see what Jervis is like and it's stage of development. Please note: due to the nature of this quickstart it's not recommended that you build anything because you won't have prerequisites or slaves hooked up. This is meant to solely show of how Jervis generates jobs.

On a Linux machine open a terminal.

cd ~/Downloads
wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
mkdir jervis-test
JENKINS_HOME=./jervis-test java -jar jenkins.war

Jenkins should now be running on http://localhost:8080/. Install plugins by going to Manage Jenkins > Manage Plugins > Available. The following plugins need to be installed at a minimum.

  1. Job DSL Plugin
  2. Cloudbees Folders Plugin
  3. GitHub Plugin
  4. View Job Filters Plugin
  5. PostBuildScript Plugin

You'll need to restart the server. In the terminal type Ctrl+C to shut the server down. Then start the server again.

JENKINS_HOME=./jervis-test java -jar jenkins.war

Once you have the plugins installed you need to create a new project. This project will be called a seed job because it will be used to create all other jobs.

  1. On the home page, in the menu click New Item > Freestyle project. Call the job _jervis_generator.
  2. Check This build is parameterized and create a new text parameter named project. Set the value to samrocketman/jervis.
  3. Set the Source Code Management to Git and to clone: https://github.com/samrocketman/jervis.git
  4. Add a new Build step called Execute shell and make the contents ./gradlew libs. This will assemble libraries into the workspace which Jervis Job DSL scripts will make use in the classpath.
  5. Add a new Build step called Process Job DSLs. Configure the following settings.
  • Execute scripts on the filesystem.
  • 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 - set it to multiline with the following:

      src/main/groovy
      lib/*.jar
      
  1. Save your new job.

Clone this wiki locally