The job-dsl-plugin allows the programmatic creation of projects using a DSL. Pushing job creation into a script allows you to automate and standardize your Jenkins installation, unlike anything possible before.
Jenkins is a wonderful system for managing builds, and people love using its UI to configure jobs. Unfortunately, as the number of jobs grows, maintaining them becomes tedious, and the paradigm of using a UI falls apart. Additionally, the common pattern in this situation is to copy jobs to create new ones, these "children" have a habit of diverging from their original "template" and consequently it becomes difficult to maintain consistency between these jobs.
The Jenkins job-dsl-plugin attempts to solve this problem by allowing jobs to be defined with the absolute minimum necessary in a programmatic form, with the help of templates that are synced with the generated jobs. The goal is for your project to be able to define all the jobs they want to be related to their project, declaring their intent for the jobs, leaving the common stuff up to a template that were defined earlier or hidden behind the DSL.
Please join the mailing list ( https://groups.google.com/d/forum/job-dsl-plugin) for any user or developer questions.
After installing the plugin, you'll get a new Build Step entry named "Process Job DSLs". Type the DSL directly in the text box, or point to a file in the workspace.
The DSL allows the definition of a job, and then offers a useful set of functions to configure common Jenkins items. A configure is available to give direct access to the config.xml before generating the job. The script is groovy code, which can be very powerful. Here's an example to create a job for each branch in a git repo:
See the wiki for specific steps and other examples.
The tutorial provides explicit steps to use the plugin.
This plugin is started as a hack-a-thon at the Java Posse Roundup#457. It was primarily developed for use at Netflix, but is now used at a wide range of companies and projects. It is licensed under Apache License, Version 2.0.
See Release Notes in the github wiki.
Skip to end of metadata Go to start of metadata