system-config/modules/jenkins_jobs/manifests/job.pp
Monty Taylor fe5e6f21f4 Notify the new exec job.
Change-Id: I18a3b50da001f93fac91656232211adb05bb202e
2012-04-05 19:00:00 -07: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 => Exec["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}"]
}
}