My Continues Integration Setup

This repository contains the files used to set up my jenkins server http://jenkins.dominikruf.com and the appveyor.com projects like https://ci.appveyor.com/project/domruf/kallithea.

Install/Run Server

If you want to set up your own instance(s) do the following: 1. install docker and docker-compose. 2. clone this repository 3. run docker-compose build 4. run docker-compose up (the slave node will fail to connect because you haven't configured jenkins yet) 5. open http://localhost:8080/ in your browser 6. configure jenkins as you like 7. add a new node a) set root directory to /var/jenkins_home b) set launch methode to "Launch slave agents via Java Web Start" c) under Advanced set "Tunnel connection through" to jenkins_master:50000 d) set the the name and secret in the docker-compose.yml accordingly for example

        - NODE_NAME=kallithea_basic
        - SECRET_OPT=-secret 626f203cae9f0f45daf7fb09336025f0ffe3c4fcbd90f3142bc26dc7b796fc70
  1. re-run docker-compose up

For details on using docker and docker-compose please read the docker documentation.

Update Server

  1. docker-compose stop (stops docker containers)
  2. docker-compose pull (downloads new image versions)
  3. docker-compose build (builds new version of local images)
  4. docker-compose up (starts docker containers again)

Add Jenkins Jobs

I use the Job DSL Plugin to configure all the jobs. To use the same configuration simply do the following: 1. install the all the plugins Job DSL, Environment Injector Plugin, Mercurial plugin, Cobertura Plugin, Folders Plugin, Extra Columns Plugin, Compact Columns, scripttrigger and Violations plugin (Feel free to install more plugins. But these are the plugins needed to create the jobs specified in the .groovy files) 3. create a new "seed" job 4. add this repository in the Source Code Management configuration 5. add a "Process Job DSLs" build step 6. set the .groovy file you want to use as DSL Script

See the Job DSL Plugin documentation for details on how to use it.