xmlrpc doc fix
This commit is contained in:
parent
738bb2087d
commit
80174c6d3e
|
@ -1,25 +1,15 @@
|
||||||
class ProductsController < ApplicationController
|
class ProductsController < ApplicationController
|
||||||
before_filter :authenticate_user!, :except => [:product_begin, :product_end]
|
before_filter :authenticate_user!, :except => [:product_status]
|
||||||
before_filter :find_product_by_name, :only => [:product_begin, :product_end]
|
before_filter :find_product, :only => [:show, :edit, :update, :build, :product_status]
|
||||||
before_filter :find_product, :only => [:show, :edit, :update, :build]
|
before_filter :find_platform, :except => [:product_status, :build]
|
||||||
before_filter :find_platform, :except => [:product_begin, :product_end, :build]
|
|
||||||
|
|
||||||
def product_begin
|
def product_status
|
||||||
@product.build_status = Product::STATUS::BUILDING
|
@product.build_status = params[:status] == "0" ? Product::BUILD_COMPLETED : Product::BUILD_FAILED
|
||||||
@product.build_path = params[:path]
|
|
||||||
@product.save!
|
@product.save!
|
||||||
|
|
||||||
render :nothing => true, :status => 200
|
render :nothing => true, :status => 200
|
||||||
end
|
end
|
||||||
|
|
||||||
def product_end
|
|
||||||
@product.build_status = ((params[:status] == BuildServer::SUCCESS) ? Product::BUILD_COMPLETED : Product::BUILD_FAILED)
|
|
||||||
@product.build_path = params[:path]
|
|
||||||
@product.save!
|
|
||||||
|
|
||||||
render :nothing => true, :status => 200
|
|
||||||
end
|
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@product = @platform.products.new
|
@product = @platform.products.new
|
||||||
@product.ks = DEFAULT_KS
|
@product.ks = DEFAULT_KS
|
||||||
|
@ -38,7 +28,7 @@ class ProductsController < ApplicationController
|
||||||
|
|
||||||
def build
|
def build
|
||||||
flash[:notice] = t('flash.product.build_started')
|
flash[:notice] = t('flash.product.build_started')
|
||||||
ProductBuilder.create_product @product.name, @product.platform.name, [], [], '', '/var/rosa', []
|
ProductBuilder.create_product @product.id, '/var/rosa', @product.ks, @product.menu, @product.build, @product.counter
|
||||||
redirect_to :action => :show
|
redirect_to :action => :show
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ class ProductBuilder
|
||||||
@@client ||= XMLRPC::Client.new3(:host => APP_CONFIG['product_builder_ip'], :port => APP_CONFIG['product_builder_port'], :path => APP_CONFIG['product_builder_path'])
|
@@client ||= XMLRPC::Client.new3(:host => APP_CONFIG['product_builder_ip'], :port => APP_CONFIG['product_builder_port'], :path => APP_CONFIG['product_builder_path'])
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_product name, platform_name, params, packages, post_install, path, repos
|
def self.create_product product_id, path, kstemplate, menuxml, build, counter
|
||||||
self.client.call('create_product', name, platform_name, params, packages, post_install, path, repos)
|
self.client.call('create_product', product_id, path, kstemplate, menuxml, build, counter)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue