rosa-build/lib/product_builder.rb

17 lines
629 B
Ruby
Raw Normal View History

require 'xmlrpc/client'
2011-11-22 19:21:09 +00:00
class ProductBuilder
SUCCESS = 0
ERROR = 1
def self.client(distrib_type)
@@client ||= XMLRPC::Client.new3(:host => APP_CONFIG['product_builder_ip'][distrib_type], :port => APP_CONFIG['product_builder_port'], :path => APP_CONFIG['product_builder_path'])
end
def self.create_product pbl # product_build_list
self.client(pbl.product.platform.distrib_type).
call('create_product', pbl.id.to_s, pbl.product.platform.name, pbl.product.ks, pbl.product.menu,
pbl.product.build_script, pbl.product.counter, [], "#{pbl.base_url}#{pbl.product.tar.url}")
end
end