Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Jenkins Job-DSL in Action

Jenkins Job-DSL in Action

Think of the ability to write your jenkins jobs as code. This is what Jenkins Job-DSL Plugin brings in. Configuration as Code is the paradigm which is heavily used to describe jobs in Jenkins with Job-DSL plugin.

This was a demo talk at Devoxx MA 2016.

Avatar for Ataul W. Ahmad

Ataul W. Ahmad

November 01, 2016
Tweet

Other Decks in Programming

Transcript

  1. About me • Working with Java since 1997 • Freelancer

    since 2001 • Certified as • Java Developer • Software Architect • Project Manager #JobDSL @Ataul_Ahmad
  2. Agenda • Configuration as Code • Job DSL • Seed

    Job • Demo • Q & A #JobDSL @Ataul_Ahmad
  3. Simple Job #JobDSL job(name) { scm { git { branch(gitBranch)

    remote { url(repository) } } } triggers { scm 'H/5 * * * *' } steps { gradle { tasks('clean build') } } } @Ataul_Ahmad
  4. Seed Job #JobDSL job('Seed') { [. . .] steps {

    jobDsl { ignoreExisting(true) ignoreMissingFiles(false) removedJobAction('DELETE') removedViewAction('DELETE') targets('jobs/Seed.groovy') additionalClasspath 'src/main/groovy' } } } @Ataul_Ahmad