system-config/modules/jenkins_jobs/manifests/job.pp
Andrew Hutchings 5289354f22 Fixes to Jenkins Job filler
* Venv job had a bad variable, breaking its name
* Jobs without publishers don't work, empty publisher tag needed
* Don't set group permissions, Jenkins modifies them anyway
* Only notify Jenkins on important files

Change-Id: Idf32d25b37d60530671fa4c16fedd40b1d46047f
2012-03-28 14:20:28 +01:00

37 lines
1.0 KiB
Puppet

define jenkins_jobs::job($site, $project, $job, $triggers="", $builders, $publishers="", $logrotate="", $scm="") {
file { "/var/lib/jenkins/jobs/${project}-${job}":
ensure => directory,
owner => 'jenkins',
}
file { "/var/lib/jenkins/jobs/${project}-${job}/builds":
ensure => directory,
owner => 'jenkins',
require => File["/var/lib/jenkins/jobs/${project}-${job}"]
}
file { "/var/lib/jenkins/jobs/${project}-${job}/config-history":
ensure => directory,
owner => 'jenkins',
require => File["/var/lib/jenkins/jobs/${project}-${job}"]
}
file { "/var/lib/jenkins/jobs/${project}-${job}/config.xml":
ensure => present,
content => template("jenkins_jobs/body.xml.erb"),
owner => 'jenkins',
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
notify => Service["jenkins"]
}
file { "/var/lib/jenkins/jobs/${project}-${job}/nextBuildNumber":
ensure => present,
content => "1",
owner => 'jenkins',
replace => false,
require => File["/var/lib/jenkins/jobs/${project}-${job}"]
}
}