Make the gitweb links in gerrit point to git.o.o

Gerrit has builtin support for cgit links. Use it - but test it out on
review-dev first.

Change-Id: I8ea38e08258cdc8eb95e2fc3c1da5a4dc8faee57
This commit is contained in:
Monty Taylor 2013-08-19 13:40:08 -04:00
parent 258abe1a23
commit af78ec85cc
4 changed files with 23 additions and 1 deletions
modules
gerrit
manifests
templates
openstack_project/manifests

View File

@ -60,6 +60,10 @@
# A boolean enabling local replication for apache acceleration
# gitweb:
# A boolean enabling gitweb
# cgit:
# A boolean enabling cgit
# web_repo_url:
# Url for setting the location of an external git browser
# testmode:
# Set this to true to disable cron jobs and replication,
# which can interfere with testing.
@ -110,6 +114,8 @@ class gerrit(
$replication = [],
$replication_targets = [],
$gitweb = true,
$cgit = false,
$web_repo_url = '',
$testmode = false
) {
include apache

View File

@ -78,9 +78,16 @@
[melody]
monitoring = <%= enable_melody %>
session = <%= melody_session %>
<% if gitweb -%>
<% if gitweb or cgit -%>
[gitweb]
<% if gitweb -%>
revision = "?p=${project}.git;a=commitdiff;h=${commit}"
<% else -%>
type = cgit
<% end -%>
<% if web_repo_url -%>
url = "<%= web_repo_url %>"
<% end -%>
<% end -%>
<% if contactstore == true -%>
[contactstore]

View File

@ -60,6 +60,9 @@ class openstack_project::gerrit (
$sysadmins = [],
$swift_username = '',
$swift_password = '',
$gitweb = true,
$cgit = false,
$web_repo_url = '',
) {
class { 'openstack_project::server':
iptables_public_tcp_ports => [80, 443, 29418],
@ -150,6 +153,9 @@ class openstack_project::gerrit (
email_private_key => $email_private_key,
replicate_local => $replicate_local,
replication => $replication,
gitweb => $gitweb,
cgit => $cgit,
web_repo_url => $web_repo_url,
testmode => $testmode,
require => Class[openstack_project::server],
}

View File

@ -59,6 +59,9 @@ class openstack_project::review_dev (
'trivial-rebase@review-dev.openstack.org',
email_private_key => $email_private_key,
sysadmins => $sysadmins,
gitweb => false,
cgit => true,
web_repo_url => 'https://git.openstack.org/cgit',
swift_username => $swift_username,
swift_password => $swift_password,
replication => [