Your SlideShare is downloading. ×
0
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Configuration As Code: The Job DSL Plugin

1,267

Published on

An introduction the Job DSL plugin for the Jenkins continuous integration server. Learn how to treat job and view configuration as code, how to store the configuration in SCM and how to apply code …

An introduction the Job DSL plugin for the Jenkins continuous integration server. Learn how to treat job and view configuration as code, how to store the configuration in SCM and how to apply code reuse and refactoring. Learn how to extend the Job DSL for your favorite plugins.

Published in: Software, Technology, Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,267
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
16
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Jenkins User Conference Europe #jenkinsconf Configuration As Code The Job DSL Plugin Daniel Spilker CoreMedia www.coremedia.com June 25, 2014 #jenkinsconf
  • 2. Jenkins User Conference Europe #jenkinsconf Current Situation • No single job that builds everything • Each branch needs its own pipeline • Every team has their own jobs
  • 3. Jenkins User Conference Europe #jenkinsconf Problem • Lots of copy&paste • Editing in HTML text areas • Settings hidden behind Advanced button • Working with the UI can be slow
  • 4. Jenkins User Conference Europe #jenkinsconf Configuration As Code • Create new pipelines quickly • Refactor jobs • Trace changes • Work with your favorite tool set
  • 5. Jenkins User Conference Europe #jenkinsconf There Is A Plugin For That • Template Project Plugin • Job Generator Plugin • Literate Plugin • JobConfigHistory Plugin • … • Job DSL Plugin Open Icon Library / CC BY 3.0
  • 6. Jenkins User Conference Europe #jenkinsconf Job DSL Language job { name('job-dsl-plugin-folders') scm { github('daspilker/job-dsl-plugin', 'folders') } triggers { githubPush() } steps { gradle('clean build') } publishers { archiveArtifacts('**/job-dsl.hpi') } }
  • 7. Jenkins User Conference Europe #jenkinsconf Job DSL Language job { name('job-dsl-plugin-folders') scm { github('daspilker/job-dsl-plugin', 'folders') } triggers { githubPush() } steps { gradle('clean build') } publishers { archiveArtifacts('**/job-dsl.hpi') } }
  • 8. Jenkins User Conference Europe #jenkinsconf Job DSL Language job { name('job-dsl-plugin-folders') scm { github('daspilker/job-dsl-plugin', 'folders') } triggers { githubPush() } steps { gradle('clean build') } publishers { archiveArtifacts('**/job-dsl.hpi') } }
  • 9. Jenkins User Conference Europe #jenkinsconf Job DSL Language job { name('job-dsl-plugin-folders') scm { github('daspilker/job-dsl-plugin', 'folders') } triggers { githubPush() } steps { gradle('clean build') } publishers { archiveArtifacts('**/job-dsl.hpi') } }
  • 10. Jenkins User Conference Europe #jenkinsconf Job DSL Language job { name('job-dsl-plugin-folders') scm { github('daspilker/job-dsl-plugin', 'folders') } triggers { githubPush() } steps { gradle('clean build') } publishers { archiveArtifacts('**/job-dsl.hpi') } }
  • 11. Jenkins User Conference Europe #jenkinsconf Job DSL Language job { name('job-dsl-plugin-folders') scm { github('daspilker/job-dsl-plugin', 'folders') } triggers { githubPush() } steps { gradle('clean build') } publishers { archiveArtifacts('**/job-dsl.hpi') } }
  • 12. Jenkins User Conference Europe #jenkinsconf Job DSL Plugin • Install Job DSL Plugin • Create free-style project • Add “Source Code Management” • Add “Process Job DSL” build step • Configure scripts • Run job
  • 13. Jenkins User Conference Europe #jenkinsconf Job DSL Plugin • Install Job DSL Plugin • Create free-style project • Add “Source Code Management” • Add “Process Job DSL” build step • Configure scripts • Run job
  • 14. Jenkins User Conference Europe #jenkinsconf Job DSL Plugin • Install Job DSL Plugin • Create free-style project • Add “Source Code Management” • Add “Process Job DSL” build step • Configure scripts • Run job
  • 15. Jenkins User Conference Europe #jenkinsconf Job DSL Plugin • Install Job DSL Plugin • Create free-style project • Add “Source Code Management” • Add “Process Job DSL” build step • Configure scripts • Run job
  • 16. Jenkins User Conference Europe #jenkinsconf Job DSL Plugin • Install Job DSL Plugin • Create free-style project • Add “Source Code Management” • Add “Process Job DSL” build step • Configure scripts • Run job
  • 17. Jenkins User Conference Europe #jenkinsconf Job DSL Plugin • Install Job DSL Plugin • Create free-style project • Add “Source Code Management” • Add “Process Job DSL” build step • Configure scripts • Run job
  • 18. Jenkins User Conference Europe #jenkinsconf Job DSL Plugin • Install Job DSL Plugin • Create free-style project • Add “Source Code Management” • Add “Process Job DSL” build step • Configure scripts • Run job
  • 19. Jenkins User Conference Europe #jenkinsconf Batteries Included EnvInject Groovy Copy Artifact Git Subversion Folders Extra Columns StashNotifier Maven Deployment Linker Gradle Build Pipeline Workspace Cleanup GitHub Pull Request Builder GitHub Multiple SCMs JaCoCoRelease Build Flow Robot Framework Tool Environment Conditional BuildStep Throttle Concurrent Builds Associated Files JSHint Checkstyle Emma Xvnc Prerequisite Build Step AnsiColor Timestamper Text-Finder Job DSL Perforce Ant Maven Project
  • 20. Jenkins User Conference Europe #jenkinsconf Extending The DSL
  • 21. Jenkins User Conference Europe #jenkinsconf Extending The DSL
  • 22. Jenkins User Conference Europe #jenkinsconf Extending The DSL job { ... configure { project -> project / buildWrappers << EnvInjectPasswordWrapper { injectGlobalPasswords(true) } } }
  • 23. Jenkins User Conference Europe #jenkinsconf Everything is Groovy @Grab(…) … gitHub.user('daspilker').repos.each { repo -> repo.branches.each { branch -> job { name("${repo.name}-${branch.name}") scm { github(repo.name, branch.name) } … } } }
  • 24. Jenkins User Conference Europe #jenkinsconf Further Information • Documentation https://github.com/jenkinsci/job-dsl-plugin/wiki • Examples https://github.com/sheehan/job-dsl-gradle-example • Playground http://job-dsl.herokuapp.com/ • Mailing List https://groups.google.com/forum/?fromgroups#!forum/job-dsl-plugin
  • 25. Jenkins User Conference Europe #jenkinsconf Corporate Community Thank You To Our Sponsors Platinum Gold Silver
  • 26. Jenkins User Conference Europe #jenkinsconf Thank You Daniel Spilker daniel.spilker@coremedia.com @daspilker We‘re hiring www.coremedia.com @CoreMediaMinds

×