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
This commit is contained in:
Andrew Hutchings 2012-03-28 10:57:01 +01:00
parent 38351a1494
commit 5289354f22
3 changed files with 7 additions and 15 deletions

View File

@ -74,7 +74,7 @@ define jenkins_jobs::add_jobs($site) {
jenkins_jobs::job { "${name}-venv":
site => "${site}",
project => "${job}",
project => "${name}",
job => "venv",
triggers => template("jenkins_jobs/trigger_timed_midnight.xml.erb"),
builders => template("jenkins_jobs/builder_venv.xml.erb"),

View File

@ -3,42 +3,34 @@ define jenkins_jobs::job($site, $project, $job, $triggers="", $builders, $publis
file { "/var/lib/jenkins/jobs/${project}-${job}":
ensure => directory,
owner => 'jenkins',
group => 'nogroup'
}
file { "/var/lib/jenkins/jobs/${project}-${job}/builds":
ensure => directory,
owner => 'jenkins',
group => 'nogroup',
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
notify => Service["jenkins"]
require => File["/var/lib/jenkins/jobs/${project}-${job}"]
}
file { "/var/lib/jenkins/jobs/${project}-${job}/config-history":
ensure => directory,
owner => 'jenkins',
group => 'nogroup',
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
notify => Service["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',
group => 'nogroup',
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
notify => Service["jenkins"]
}
file { "/var/lib/jenkins/jobs/${project}-${job}/nextBuildNumer":
file { "/var/lib/jenkins/jobs/${project}-${job}/nextBuildNumber":
ensure => present,
content => "1",
owner => 'jenkins',
group => 'nogroup',
replace => false,
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
notify => Service["jenkins"]
require => File["/var/lib/jenkins/jobs/${project}-${job}"]
}
}

View File

@ -50,10 +50,10 @@
<%= builders %>
</builders>
<% end %>
<% if publishers != "" %>
<publishers>
<% if publishers != "" %>
<%= publishers %>
</publishers>
<% end %>
</publishers>
<buildWrappers/>
</project>