3
votes

We have a Jenkins master-slave model. Each job that is being run on slaves require a certain amount of configuration files. These files must be copied from master to each slave before the build step. So far I have been able to accomplish this with the Config File Provider Plugin. The drawback of this plugin is that it doesn't support folders, I would like to be able to put the configuration files for slave1 in the folder slave1 and so on. Now I have a huge list of files in the dropdown menu when creating a job and asked to provide configuration files.

This plugin comes with something handy: the configuration files can be edited via the web interface.

On the other hand Jenkins provides a userContent folder on the master accessible via http://[jenkins-server]/userContent that resolves my need for folders, but I haven't found a way to edit these files from the provided web interface.

I must mention that the master is a remote machine and I don't want to connect to it everytime I need to modify a file there. Is there any way to edit the files in the userContent folder, or to organize the files uploaded to the Config File Plugin into folders?

Thanks!

2

2 Answers

5
votes

If possible put all the configuration into your SCM system and allow Jenkins to fetch them when needed/as they change.

Then your configuration files are managed just like your source code. As a bonus you can add a new node easily and developers can access and use they configuration files to test their build.

Supporting evidence:

  1. Martin Fowler
  2. Andrew Binstock
  3. Darryl Bowler
0
votes

If you have environment specific config files you can either load all of the individual config files into into your SCM system (this becomes unmanageable if you have a lot). Alternatively you can still store them in your SCM system and then do some combination of scripting with Jenkins parameters to update them on the fly.