diff --git a/manifests/site.pp b/manifests/site.pp index d4b586fa37..7cdc620006 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -72,7 +72,7 @@ node 'jenkins.openstack.org' { sysadmins => hiera('sysadmins'), } class { 'openstack_project::zuul': - jenkins_server => "https://${::fqdn}", + jenkins_url => "https://${::fqdn}", jenkins_user => 'hudson-openstack', jenkins_apikey => hiera('zuul_jenkins_apikey'), gerrit_server => 'review.openstack.org', @@ -181,6 +181,19 @@ node 'static.openstack.org' { } } +node 'zuul.openstack.org' { + class { 'openstack_project::zuul': + jenkins_host => 'jenkins.openstack.org', + jenkins_url => 'https://jenkins.openstack.org', + jenkins_user => 'hudson-openstack', + jenkins_apikey => hiera('zuul_jenkins_apikey'), + gerrit_server => 'review.openstack.org', + gerrit_user => 'jenkins', + url_pattern => 'http://logs.openstack.org/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}', + sysadmins => hiera('sysadmins'), + } +} + # A bare machine, but with a jenkins user node /^.*\.template\.openstack\.org$/ { include openstack_project::slave_template diff --git a/modules/openstack_project/manifests/zuul.pp b/modules/openstack_project/manifests/zuul.pp index 232b05c1f5..ceab925951 100644 --- a/modules/openstack_project/manifests/zuul.pp +++ b/modules/openstack_project/manifests/zuul.pp @@ -1,16 +1,29 @@ # == Class: openstack_project::zuul # class openstack_project::zuul( - $jenkins_server = '', + $jenkins_host = '', + $jenkins_url = '', $jenkins_user = '', $jenkins_apikey = '', $gerrit_server = '', $gerrit_user = '', - $url_pattern = '' + $url_pattern = '', + $sysadmins = [] ) { + $rules = [ "-m state --state NEW -m tcp -p tcp --dport 8001 -s ${jenkins_host} -j ACCEPT" ] + + # TODO: This is temporary to handle the transition to a standalone server + if ($sysadmins != []) { + class { 'openstack_project::server': + iptables_public_tcp_ports => [80, 443], + iptables_rules4 => $rules, + sysadmins => $sysadmins, + } + } + class { '::zuul': - jenkins_server => $jenkins_server, + jenkins_server => $jenkins_url, jenkins_user => $jenkins_user, jenkins_apikey => $jenkins_apikey, gerrit_server => $gerrit_server,