04bf54ac40
Each job has a manifest in the jenkins_jobs/manifests/jobs directory Jobs are grouped in python_jobs and generic_jobs The job groups or individual jobs can be added to a site manifest Also fixes bad XML output, python27 job and bug 987428 Change-Id: I1ebc889cee08b080deb6ba46aee69ab2ae0bb6b6
14 lines
391 B
Ruby
14 lines
391 B
Ruby
module Puppet::Parser::Functions
|
|
newfunction(:builder, :type => :rvalue) do |args|
|
|
file = "jenkins_jobs/builder_" + args[0] + ".xml.erb"
|
|
wrapper = Puppet::Parser::TemplateWrapper.new(self)
|
|
wrapper.file = file
|
|
begin
|
|
wrapper.result
|
|
rescue => detail
|
|
raise Puppet::ParseError,
|
|
"Failed to parse template #{file}: #{detail}"
|
|
end
|
|
end
|
|
end
|