job-dsl-slides



job-dsl-slides

0 1


job-dsl-slides


On Github sheehan / job-dsl-slides

+

with the Job DSL Plugin

Matt Sheehan

Configuration as Code

  • Source Control
  • Testable
  • Reviewable
  • DRY

Jenkins Job Structure

  • Parameters
  • SCM
  • Triggers
  • Build steps
  • Post-build actions

Demo: Job UI Configuration

DSL Example

job('gr8 example') {
    scm {
        github 'sheehan/job-dsl-gradle-example'
    }
    triggers {
      	scm 'H/5 * * * *'
    }
    steps {
        gradle 'clean test'
    }
    publishers {
        archiveJunit 'build/test-results/**/*.xml'
        extendedEmail 'mr.sheehan@gmail.com'
    }
}

DSL Playground

http://job-dsl.herokuapp.com

DSL Documentation

https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands

Auto-generated Docs

are in the works. Preview them here.

IDE Support

Job DSL Plugin

Developer updates DSL scripts locally Developer pushes changes SCM change triggers seed job Seed job runs DSL Seed job updates/creates/deletes

Demo: Create a Seed Job

Job DSL Gradle Example

https://github.com/sheehan/job-dsl-gradle-example

Examples

https://github.com/sheehan/job-dsl-gradle-example/tree/master/jobs

Testing

Jenkins Chef DSL Cookbook

https://github.com/erichelgeson/jenkins-chef-dsl

Thanks!

Forum: https://groups.google.com/forum/#!forum/job-dsl-plugin

+ with the Job DSL Plugin Matt Sheehan