Andrew Hutchings c3db5b210a Jenkins Job builder 2.0
This uses a python script with modules for parts of the XML.  The parameters for the projects are provided using YAML scripts.

It also includes a Jenkins API module to directly inject jobs into Jenkins without requiring a restart/reload as well as a memory of which jobs have been pushed to Jenkins.

It is currently configured to replace the original Jenkins Jobs in StackForge.

What it won't yet do:
1. Delete jobs (although it isn't far off being able to)
2. check-* jobs (need to modify the trigger_gerrit module to support that)

Documentation to follow

Fixes bug #995599

Change-Id: I2a67ee2d9e8f43cbced56425ef7f80dc6a30a814
2012-05-11 14:43:52 +01:00

26 lines
644 B
Puppet

class jenkins_jobs($site, $projects) {
file { '/usr/local/jenkins_jobs':
owner => 'root',
group => 'root',
mode => 755,
ensure => 'directory',
recurse => true,
source => ['puppet:///modules/jenkins_jobs/']
}
file { '/usr/local/jenkins_jobs/jenkins_jobs.ini':
owner => 'root',
group => 'root',
mode => 440,
ensure => 'present',
source => 'file:///root/secret-files/jenkins_jobs.ini',
replace => 'true',
require => File['/usr/local/jenkins_jobs']
}
jenkins_jobs::process_projects { $projects:
site => $site,
require => File['/usr/local/jenkins_jobs/jenkins_jobs.ini']
}
}