Posted by: terryhowe | June 29, 2017

Automating Jenkins Configuration

What makes automating configuration of Jenkins so hard is there are so many ways to do it.  The easy and mindless way is to configure up a jenkins server and save xml configuration files.  To recreate the configuration you just need to automate the install and copy in the configuration file.  This works great until things start getting complicated like maybe you want to configure a job.  There are a lot of files associated with a single job.

Another approach is to use the Jenkins CLI which is great for some things, but you will quickly find that it is very limited.  There are a lot of things that cannot be configured the CLI.

Yet another approach is to use the web UI to set various configuration values.  This works well for some things, but not everything is available through that interface.

If you start on any of these paths you most likely end up with a combination of all three, but the best answer is to just use the groovy as much as possilble.  You may need to use some of the other approaches, but groovy is by far the comprehensive and it will be easier to support.

I’m going to post up some examples on github for automating Jenkins with groovy using ansible.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: