abf/abf-worker#19: Pass extra params for workers
This commit is contained in:
parent
03f60464d1
commit
9477a0af4b
|
@ -424,13 +424,16 @@ class BuildList < ActiveRecord::Base
|
|||
# git_project_address.gsub!(/^http:\/\/(0\.0\.0\.0|localhost)\:[\d]+/, 'https://abf.rosalinux.ru') unless Rails.env.production?
|
||||
{
|
||||
:id => id,
|
||||
:arch => arch.name,
|
||||
:time_living => (build_for_platform.platform_arch_settings.by_arch(arch).first.try(:time_living) || PlatformArchSetting::DEFAULT_TIME_LIVING),
|
||||
:distrib_type => build_for_platform.distrib_type,
|
||||
:git_project_address => git_project_address,
|
||||
:commit_hash => commit_hash,
|
||||
:include_repos => include_repos_hash,
|
||||
:bplname => build_for_platform.name,
|
||||
:platform => {
|
||||
:type => build_for_platform.distrib_type,
|
||||
:name => build_for_platform.name,
|
||||
:arch => arch.name
|
||||
},
|
||||
:user => {:uname => user.uname, :email => user.email}
|
||||
}
|
||||
end
|
||||
|
|
|
@ -168,8 +168,11 @@ class ProductBuildList < ActiveRecord::Base
|
|||
:params => params,
|
||||
:time_living => time_living,
|
||||
:main_script => main_script,
|
||||
:arch => arch.name,
|
||||
:distrib_type => product.platform.distrib_type,
|
||||
:platform => {
|
||||
:type => product.platform.distrib_type,
|
||||
:name => product.platform.name,
|
||||
:arch => arch.name
|
||||
},
|
||||
:user => {:uname => user.try(:uname), :email => user.try(:email)}
|
||||
}
|
||||
end
|
||||
|
|
|
@ -110,10 +110,13 @@ module AbfWorker
|
|||
'class' => 'AbfWorker::PublishWorkerDefault',
|
||||
'args' => [{
|
||||
:id => build_list.id,
|
||||
:arch => build_list.arch.name,
|
||||
:distrib_type => distrib_type,
|
||||
:cmd_params => cmd_params,
|
||||
:platform => {:platform_path => platform_path},
|
||||
:platform => {
|
||||
:platform_path => platform_path,
|
||||
:type => build_list.build_for_platform.distrib_type,
|
||||
:name => build_list.build_for_platform.name,
|
||||
:arch => build_list.arch.name
|
||||
},
|
||||
:repository => {:id => build_list.save_to_repository_id},
|
||||
:type => :publish,
|
||||
:time_living => 9600, # 160 min
|
||||
|
@ -191,10 +194,13 @@ module AbfWorker
|
|||
'class' => "AbfWorker::PublishWorkerDefault",
|
||||
'args' => [{
|
||||
:id => r.id,
|
||||
:arch => 'x86_64',
|
||||
:distrib_type => distrib_type,
|
||||
:cmd_params => cmd_params,
|
||||
:platform => {:platform_path => "#{r.platform.path}/repository"},
|
||||
:platform => {
|
||||
:platform_path => "#{r.platform.path}/repository",
|
||||
:type => distrib_type,
|
||||
:name => r.platform.name,
|
||||
:arch => 'x86_64'
|
||||
},
|
||||
:repository => {:id => r.id},
|
||||
:type => :resign,
|
||||
:skip_feedback => true,
|
||||
|
@ -301,10 +307,13 @@ module AbfWorker
|
|||
lock_str = "#{save_to_repository_id}-#{build_for_platform_id}"
|
||||
options = {
|
||||
:id => (bl ? bl.id : Time.now.to_i),
|
||||
:arch => (bl ? bl.arch.name : 'x86_64'),
|
||||
:distrib_type => distrib_type,
|
||||
:cmd_params => cmd_params,
|
||||
:platform => {:platform_path => platform_path},
|
||||
:platform => {
|
||||
:platform_path => platform_path,
|
||||
:type => distrib_type,
|
||||
:name => build_for_platform.name,
|
||||
:arch => (bl ? bl.arch.name : 'x86_64')
|
||||
},
|
||||
:repository => {:id => save_to_repository_id},
|
||||
:type => :publish,
|
||||
:time_living => 9600, # 160 min
|
||||
|
@ -369,10 +378,13 @@ module AbfWorker
|
|||
|
||||
options = {
|
||||
:id => Time.now.to_i,
|
||||
:arch => 'x86_64',
|
||||
:distrib_type => build_for_platform.distrib_type,
|
||||
:cmd_params => cmd_params,
|
||||
:platform => {:platform_path => "#{rep.platform.path}/repository"},
|
||||
:platform => {
|
||||
:platform_path => "#{rep.platform.path}/repository",
|
||||
:type => build_for_platform.distrib_type,
|
||||
:name => build_for_platform.name,
|
||||
:arch => 'x86_64'
|
||||
},
|
||||
:repository => {:id => rep.id},
|
||||
:type => :publish,
|
||||
:time_living => 9600, # 160 min
|
||||
|
|
Loading…
Reference in New Issue