Fix job generation

This commit is contained in:
Jordan Sissel 2012-10-15 23:09:42 -07:00
parent 0581bb278e
commit 3c36390b1e

View file

@ -11,10 +11,10 @@ plugindir = File.join(File.dirname(__FILE__), "..", "..", "lib", "logstash")
plugins = %w(inputs filters outputs).collect { |t| Dir.glob(File.join(plugindir, t, "*.rb")) }.flatten
template = ERB.new("config.xml.erb")
template = ERB.new(File.read(File.join(File.dirname(__FILE__), "config.xml.erb")))
plugins.each do |path|
job = path.gsub(/.*\/([^\/]+)\/([^\/]+)\.rb$/, '\1-\2')
plugin_path = path.gsub(/.*\/([^\/]+)\/([^\/]+)\.rb$/, '\1/\2')
plugin_path = path.gsub(/.*\/([^\/]+)\/([^\/]+)$/, '\1/\2')
jobdir = File.join(ENV["JENKINS_HOME"], job)
puts "Writing #{jobdir}/config.xml"