6b7d540833
Adds trivial_rebase.py for bug 881184. * modules/openstack_project/files/gerrit/scripts/trivial_rebase.py: A modified version of the contrib/trivial_rebase.py included in upstream Gerrit's git tree (we'll try to get individual patches submitted upstream soon): git clone https://gerrit.googlesource.com/gerrit * modules/openstack_project/files/gerrit/patchset-created: Moved to modules/openstack_project/templates/gerrit_patchset-created.erb and added an entry for the trivial_rebase.py script with variables for its command-line options sourced from gerrit.pp and review{,_dev}.pp. * modules/openstack_project/manifests/gerrit.pp: Changed the file definition for /home/gerrit2/review_site/hooks/patchset-created to use a template, adding the ssh_host_key and trivial_rebase_role_id variables it requires. Added a file entry for trivial_rebase.py as well, since we're putting it in modules/openstack_project instead of modules/gerrit where the existing scripts reside (we'll eventually want to move all of modules/gerrit/files/scripts out of there at some point, but not now). * modules/openstack_project/manifests/review_dev.pp: Override the trivial_rebase_role_id variable to trivial-rebase@review-dev.o.o on review-dev. * modules/openstack_project/manifests/review.pp: Override the trivial_rebase_role_id variable to trivial-rebase@review.o.o on review. Change-Id: I941f15525c72b84708ae1de6832834eb53ab6863 Reviewed-on: https://review.openstack.org/12373 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
45 lines
1.5 KiB
Puppet
45 lines
1.5 KiB
Puppet
class openstack_project::review_dev (
|
|
$github_oauth_token,
|
|
$mysql_password,
|
|
$mysql_root_password,
|
|
$email_private_key,
|
|
$sysadmins = []
|
|
) {
|
|
class { 'openstack_project::gerrit':
|
|
vhost_name => 'review-dev.openstack.org',
|
|
canonicalweburl => "https://review-dev.openstack.org/",
|
|
ssl_cert_file => '/etc/ssl/certs/ssl-cert-snakeoil.pem',
|
|
ssl_key_file => '/etc/ssl/private/ssl-cert-snakeoil.key',
|
|
ssl_chain_file => '',
|
|
email => "review-dev@openstack.org",
|
|
war => 'http://tarballs.openstack.org/ci/gerrit-2.4.2-11-gb5a28fb.war',
|
|
script_user => 'launchpadsync',
|
|
script_key_file => '/home/gerrit2/.ssh/launchpadsync_rsa',
|
|
script_logging_conf => '/home/gerrit2/.sync_logging.conf',
|
|
projects_file => 'puppet:///openstack_project/review-dev.projects.yaml',
|
|
github_username => 'openstack-gerrit-dev',
|
|
github_oauth_token => $github_oauth_token,
|
|
mysql_password => $mysql_password,
|
|
mysql_root_password => $mysql_root_password,
|
|
trivial_rebase_role_id => 'trivial-rebase@review-dev.openstack.org',
|
|
email_private_key => $email_private_key,
|
|
sysadmins => $sysadmins
|
|
}
|
|
|
|
file { '/var/log/gerrit_user_sync':
|
|
ensure => directory,
|
|
owner => root,
|
|
group => gerrit2,
|
|
mode => 0775,
|
|
require => User['gerrit2']
|
|
}
|
|
file { '/home/gerrit2/.sync_logging.conf':
|
|
ensure => present,
|
|
owner => root,
|
|
group => gerrit2,
|
|
mode => 0644,
|
|
source => 'puppet:///modules/openstack_project/gerrit/launchpad_sync_logging.conf',
|
|
require => User['gerrit2']
|
|
}
|
|
}
|