system-config/modules/openstack_project/manifests/zuul_dev.pp
James E. Blair b93eb82cad Add testresult commentlink
Will take effect when Zuul is running this change:
  I74702fd7d37358e6f4caa7e7ac0a3ede73184077

This change also adds that feature to the Zuul config and enables
it for OpenStack.  It also adds the ability to specify HTML in a
commentlink (and uses it).

Change-Id: Idb4ad8e6079165d681271987a92cab5d8b7c81be
2013-08-18 12:43:15 -07:00

71 lines
2.2 KiB
Puppet

# == Class: openstack_project::zuul_dev
#
class openstack_project::zuul_dev(
$vhost_name = $::fqdn,
$gerrit_server = '',
$gerrit_user = '',
$zuul_ssh_private_key = '',
$url_pattern = '',
$sysadmins = [],
$statsd_host = '',
$gearman_workers = []
) {
# Turn a list of hostnames into a list of iptables rules
$iptables_rules = regsubst ($gearman_workers, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 4730 -s \1 -j ACCEPT')
class { 'openstack_project::server':
iptables_public_tcp_ports => [80],
iptables_rules6 => $iptables_rules,
iptables_rules4 => $iptables_rules,
sysadmins => $sysadmins,
}
class { '::zuul':
vhost_name => $vhost_name,
gerrit_server => $gerrit_server,
gerrit_user => $gerrit_user,
zuul_ssh_private_key => $zuul_ssh_private_key,
url_pattern => $url_pattern,
push_change_refs => false,
job_name_in_report => true,
status_url => 'http://zuul-dev.openstack.org/',
statsd_host => $statsd_host,
}
file { '/etc/zuul/layout.yaml':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/layout-dev.yaml',
notify => Exec['zuul-reload'],
}
file { '/etc/zuul/openstack_functions.py':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/openstack_functions.py',
notify => Exec['zuul-reload'],
}
file { '/etc/zuul/logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/logging.conf',
notify => Exec['zuul-reload'],
}
file { '/etc/zuul/gearman-logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/gearman-logging.conf',
notify => Exec['zuul-reload'],
}
class { '::recheckwatch':
gerrit_server => $gerrit_server,
gerrit_user => $gerrit_user,
recheckwatch_ssh_private_key => $zuul_ssh_private_key,
}
file { '/var/lib/recheckwatch/scoreboard.html':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/scoreboard.html',
require => File['/var/lib/recheckwatch'],
}
}