Split gerrit remote fetcher into a module.
Change-Id: I85fd220da7105363471a1e67fec86cd25dac95c1
This commit is contained in:
parent
e3e9aaba10
commit
4774c02153
@ -69,7 +69,6 @@ class gerrit($virtual_hostname='',
|
|||||||
$httpd_maxthreads='',
|
$httpd_maxthreads='',
|
||||||
$httpd_maxwait='',
|
$httpd_maxwait='',
|
||||||
$github_projects = [],
|
$github_projects = [],
|
||||||
$upstream_projects = [],
|
|
||||||
$commentlinks = [ { name => 'changeid',
|
$commentlinks = [ { name => 'changeid',
|
||||||
match => '(I[0-9a-f]{8,40})',
|
match => '(I[0-9a-f]{8,40})',
|
||||||
link => '#q,$1,n,z' },
|
link => '#q,$1,n,z' },
|
||||||
@ -179,12 +178,6 @@ class gerrit($virtual_hostname='',
|
|||||||
environment => "PATH=/usr/bin:/bin:/usr/sbin:/sbin",
|
environment => "PATH=/usr/bin:/bin:/usr/sbin:/sbin",
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { "gerritfetchremotes":
|
|
||||||
user => gerrit2,
|
|
||||||
minute => "*/30",
|
|
||||||
command => 'sleep $((RANDOM\%60+90)) && python /usr/local/gerrit/scripts/fetch_remotes.py',
|
|
||||||
require => File['/usr/local/gerrit/scripts'],
|
|
||||||
}
|
|
||||||
|
|
||||||
} # testmode==false
|
} # testmode==false
|
||||||
|
|
||||||
@ -237,16 +230,6 @@ class gerrit($virtual_hostname='',
|
|||||||
require => User["gerrit2"]
|
require => User["gerrit2"]
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/remotes.config':
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => 444,
|
|
||||||
ensure => 'present',
|
|
||||||
content => template('gerrit/remotes.config.erb'),
|
|
||||||
replace => 'true',
|
|
||||||
require => User["gerrit2"]
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/static/title.png':
|
file { '/home/gerrit2/review_site/static/title.png':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => "puppet:///modules/gerrit/${logo}",
|
source => "puppet:///modules/gerrit/${logo}",
|
||||||
|
18
modules/gerrit/manifests/remotes.pp
Normal file
18
modules/gerrit/manifests/remotes.pp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
class gerrit::remotes($upstream_projects) {
|
||||||
|
cron { "gerritfetchremotes":
|
||||||
|
user => gerrit2,
|
||||||
|
minute => "*/30",
|
||||||
|
command => 'sleep $((RANDOM\%60+90)) && python /usr/local/gerrit/scripts/fetch_remotes.py',
|
||||||
|
require => File['/usr/local/gerrit/scripts'],
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/home/gerrit2/remotes.config':
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => 444,
|
||||||
|
ensure => 'present',
|
||||||
|
content => template('gerrit/remotes.config.erb'),
|
||||||
|
replace => 'true',
|
||||||
|
require => User["gerrit2"]
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,6 @@ class openstack_project::gerrit (
|
|||||||
$httpd_maxthreads='',
|
$httpd_maxthreads='',
|
||||||
$httpd_maxwait='',
|
$httpd_maxwait='',
|
||||||
$github_projects = [],
|
$github_projects = [],
|
||||||
$upstream_projects = [],
|
|
||||||
$war,
|
$war,
|
||||||
$script_user,
|
$script_user,
|
||||||
$script_key_file,
|
$script_key_file,
|
||||||
@ -51,7 +50,6 @@ class openstack_project::gerrit (
|
|||||||
httpd_maxthreads => $httpd_maxthreads,
|
httpd_maxthreads => $httpd_maxthreads,
|
||||||
httpd_maxwait => $httpd_maxwait,
|
httpd_maxwait => $httpd_maxwait,
|
||||||
github_projects => $github_projects,
|
github_projects => $github_projects,
|
||||||
upstream_projects => $upstream_projects,
|
|
||||||
war => $war,
|
war => $war,
|
||||||
script_user => $script_user,
|
script_user => $script_user,
|
||||||
script_key_file => $script_key_file,
|
script_key_file => $script_key_file,
|
||||||
|
@ -38,10 +38,6 @@ class openstack_project::review {
|
|||||||
sshd_threads => '100',
|
sshd_threads => '100',
|
||||||
httpd_maxwait => '5000min',
|
httpd_maxwait => '5000min',
|
||||||
github_projects => $openstack_project::project_list,
|
github_projects => $openstack_project::project_list,
|
||||||
upstream_projects => [ {
|
|
||||||
name => 'openstack-ci/gerrit',
|
|
||||||
remote => 'https://gerrit.googlesource.com/gerrit'
|
|
||||||
} ],
|
|
||||||
war => 'http://tarballs.openstack.org/ci/gerrit-2.4.1-10-g63110fd.war',
|
war => 'http://tarballs.openstack.org/ci/gerrit-2.4.1-10-g63110fd.war',
|
||||||
script_user => 'launchpadsync',
|
script_user => 'launchpadsync',
|
||||||
script_key_file => '/home/gerrit2/.ssh/launchpadsync_rsa',
|
script_key_file => '/home/gerrit2/.ssh/launchpadsync_rsa',
|
||||||
@ -56,4 +52,10 @@ class openstack_project::review {
|
|||||||
gerritbot_server => 'irc.freenode.net',
|
gerritbot_server => 'irc.freenode.net',
|
||||||
gerritbot_user => 'gerritbot'
|
gerritbot_user => 'gerritbot'
|
||||||
}
|
}
|
||||||
|
class { 'gerrit::remotes':
|
||||||
|
upstream_projects => [ {
|
||||||
|
name => 'openstack-ci/gerrit',
|
||||||
|
remote => 'https://gerrit.googlesource.com/gerrit'
|
||||||
|
} ],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user