diff --git a/playbooks/host_vars/review01.openstack.org.yaml b/playbooks/host_vars/review01.openstack.org.yaml index 83304009a3..13e0c7034c 100644 --- a/playbooks/host_vars/review01.openstack.org.yaml +++ b/playbooks/host_vars/review01.openstack.org.yaml @@ -9,6 +9,9 @@ gerrit_replication: - '^openstack/(?!ara$|ara-web$|ara-infra$).*' - 'openstack-dev/*' - 'openstack-infra/*' + push: + - '+refs/heads/*:refs/heads/*' + - '+refs/tags/*:refs/tags/*' - name: 'gitea01' url: 'ssh://git@gitea01.opendev.org:222/' authGroup: 'Anonymous Users' diff --git a/playbooks/roles/gerrit/templates/replication.config.j2 b/playbooks/roles/gerrit/templates/replication.config.j2 index d30a85788b..4834d238d3 100644 --- a/playbooks/roles/gerrit/templates/replication.config.j2 +++ b/playbooks/roles/gerrit/templates/replication.config.j2 @@ -29,4 +29,9 @@ replicateOnStartup = false projects = {{ project }} {% endfor %} {% endif %} +{% if 'push' in replication %} +{% for refspec in replication.push %} + push = {{ refspec }} +{% endfor %} +{% endif %} {% endfor %}