The Jenkins Job Config Generator is a small eclipse RCP based Java program that allows you to define your jobs with a textual notation.
This is much faster than clicking around in the Jenkins UI - especially, when you have a set of jobs that are similar or common configuration you want to share.
The DSL for the configurations therefore provides mechanism to inherit basic configurations.
The so defined configurations are generated as config.xml
files and can simply copied to ${JENKINS\_HOME}/jobs
- Just run
./build.sh
- Use
-c
to generate your configuration. - Use
-i
on a Mac to create a DMG installer for the tool.
- Mac OS X product can be started via
./run.sh
This little section should help to get familiar with the architecture and should enable you to enhance the generator.
The grammar for the configuration DSL is defined using xtext in the file JobConfig.xtext
Out of this grammar an EMF model (aka. AST) is generated using an workflow, described in JobConfigGeneratorMWE.mwe2
Each job written in the DSL is then an instance of this model. Those instances are passed to the actually generator - written in Xtend. The generator is located in the file JobConfigGenerator.xtend
There are only integration test that do transform configuration into config.xml
and then compare the file content against the expected result. Please have a look at the main test class, which uses the test data located here
This software is distributed under the Eclipse Public License - v 1.0.