Switch gerrit to project-config
Change-Id: I3e7358b4bc64e494a5990c79d16fafc21f5ed6af
This commit is contained in:
parent
def93bc086
commit
8bdeec0693
@ -52,6 +52,7 @@ node default {
|
||||
# Node-OS: precise
|
||||
node 'review.openstack.org' {
|
||||
class { 'openstack_project::review':
|
||||
project_config_repo => 'https://git.openstack.org/openstack-infra/project-config',
|
||||
github_oauth_token => hiera('gerrit_github_token', 'XXX'),
|
||||
github_project_username => hiera('github_project_username', 'username'),
|
||||
github_project_password => hiera('github_project_password', 'XXX'),
|
||||
@ -88,6 +89,7 @@ node 'review.openstack.org' {
|
||||
# Node-OS: precise
|
||||
node 'review-dev.openstack.org' {
|
||||
class { 'openstack_project::review_dev':
|
||||
project_config_repo => 'https://git.openstack.org/openstack-infra/project-config',
|
||||
github_oauth_token => hiera('gerrit_dev_github_token', 'XXX'),
|
||||
github_project_username => hiera('github_dev_project_username', 'username'),
|
||||
github_project_password => hiera('github_dev_project_password', 'XXX'),
|
||||
|
@ -43,6 +43,8 @@ class openstack_project::gerrit (
|
||||
$contactstore_appsec = '',
|
||||
$contactstore_pubkey = '',
|
||||
$contactstore_url = '',
|
||||
$acls_dir = 'UNDEF',
|
||||
$notify_impact_file = 'UNDEF',
|
||||
$projects_file = 'UNDEF',
|
||||
$projects_config = 'UNDEF',
|
||||
$github_username = '',
|
||||
@ -322,11 +324,12 @@ class openstack_project::gerrit (
|
||||
require => Class['::gerrit'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/hooks/notify_impact.yaml':
|
||||
ensure => present,
|
||||
source =>
|
||||
'puppet:///modules/openstack_project/gerrit/notify_impact.yaml',
|
||||
require => Class['::gerrit'],
|
||||
if ($notify_impact_file != 'UNDEF') {
|
||||
file { '/home/gerrit2/review_site/hooks/notify_impact.yaml':
|
||||
ensure => present,
|
||||
source => $notify_impact_file,
|
||||
require => Class['::gerrit'],
|
||||
}
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/hooks/patchset-created':
|
||||
@ -407,7 +410,7 @@ class openstack_project::gerrit (
|
||||
replace => true,
|
||||
purge => true,
|
||||
force => true,
|
||||
source => 'puppet:///modules/openstack_project/gerrit/acls',
|
||||
source => $acls_dir,
|
||||
require => Class['::gerrit']
|
||||
}
|
||||
|
||||
|
@ -78,9 +78,14 @@ class openstack_project::review (
|
||||
$sysadmins = [],
|
||||
# For openstackwatch.
|
||||
$swift_username = '',
|
||||
$swift_password = ''
|
||||
$swift_password = '',
|
||||
$project_config_repo = '',
|
||||
) {
|
||||
|
||||
class { 'project_config':
|
||||
url => $project_config_repo,
|
||||
}
|
||||
|
||||
class { 'openstack_project::gerrit':
|
||||
ssl_cert_file => $ssl_cert_file,
|
||||
ssl_key_file => $ssl_key_file,
|
||||
@ -114,8 +119,9 @@ class openstack_project::review (
|
||||
contactstore_pubkey => $contactstore_pubkey,
|
||||
contactstore_url =>
|
||||
'http://direct.openstack.org/verify/member/',
|
||||
projects_file =>
|
||||
'puppet:///modules/openstack_project/review.projects.yaml',
|
||||
acls_dir => $::project_config::gerrit_acls_dir,
|
||||
notify_impact_file => $::project_config::gerrit_notify_impact_file,
|
||||
projects_file => $::project_config::gerrit_project_file,
|
||||
projects_config =>
|
||||
'openstack_project/review.projects.ini.erb',
|
||||
github_username => 'openstack-gerrit',
|
||||
@ -180,6 +186,7 @@ class openstack_project::review (
|
||||
mirror => true,
|
||||
},
|
||||
],
|
||||
require => $::project_config::config_dir,
|
||||
}
|
||||
|
||||
gerrit::plugin { 'javamelody':
|
||||
|
@ -21,13 +21,19 @@ class openstack_project::review_dev (
|
||||
$lp_sync_secret = '',
|
||||
$sysadmins = [],
|
||||
$swift_username = '',
|
||||
$swift_password = ''
|
||||
$swift_password = '',
|
||||
$project_config_repo = '',
|
||||
) {
|
||||
|
||||
realize (
|
||||
User::Virtual::Localuser['zaro'],
|
||||
)
|
||||
|
||||
class { 'project_config':
|
||||
url => $project_config_repo,
|
||||
base => 'dev/',
|
||||
}
|
||||
|
||||
class { 'openstack_project::gerrit':
|
||||
vhost_name => 'review-dev.openstack.org',
|
||||
canonicalweburl => 'https://review-dev.openstack.org/',
|
||||
@ -48,8 +54,9 @@ class openstack_project::review_dev (
|
||||
contactstore_pubkey => $contactstore_pubkey,
|
||||
contactstore_url =>
|
||||
'https://review-dev.openstack.org/fakestore',
|
||||
projects_file =>
|
||||
'puppet:///modules/openstack_project/review-dev.projects.yaml',
|
||||
acls_dir => $::project_config::gerrit_acls_dir,
|
||||
notify_impact_file => $::project_config::gerrit_notify_impact_file,
|
||||
projects_file => $::project_config::gerrit_project_file,
|
||||
projects_config =>
|
||||
'openstack_project/review-dev.projects.ini.erb',
|
||||
github_username => 'openstack-gerrit-dev',
|
||||
@ -81,6 +88,7 @@ class openstack_project::review_dev (
|
||||
mirror => true,
|
||||
},
|
||||
],
|
||||
require => $::project_config::config_dir,
|
||||
}
|
||||
|
||||
gerrit::plugin { 'javamelody':
|
||||
|
@ -31,7 +31,10 @@ class project_config(
|
||||
}
|
||||
}
|
||||
|
||||
$gerrit_acls_dir = "/etc/project-config/${base}gerrit/acls"
|
||||
$gerrit_notify_impact_file = "/etc/project-config/${base}gerrit/notify_impact.yaml"
|
||||
$jeepyb_project_file = "/etc/project-config/${base}gerrit/projects.yaml"
|
||||
$jenkins_job_builder_config_dir = "/etc/project-config/${base}jenkins/jobs"
|
||||
$jenkins_scripts_dir = "/etc/project-config/${base}jenkins/scripts"
|
||||
$zuul_layout_dir = "/etc/project-config/${base}zuul"
|
||||
$jenkins_scripts_dir = "/etc/project-config/${base}jenkins/scripts"
|
||||
$zuul_layout_dir = "/etc/project-config/${base}zuul"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user