diff --git a/playbooks/roles/static/files/50-ci.openstack.org.conf b/playbooks/roles/static/files/50-ci.openstack.org.conf index 93e08bae86..a587d20cf3 100644 --- a/playbooks/roles/static/files/50-ci.openstack.org.conf +++ b/playbooks/roles/static/files/50-ci.openstack.org.conf @@ -4,9 +4,9 @@ RewriteRule ^/jenkins-job-builder(/.*|$) https://docs.openstack.org/infra/jenkins-job-builder$1 [last,redirect=permanent] RewriteRule ^/nodepool(/.*|$) https://docs.openstack.org/infra/nodepool$1 [last,redirect=permanent] RewriteRule ^/openstackid(/.*|$) https://docs.openstack.org/infra/openstackid$1 [last,redirect=permanent] - RewriteRule ^/shade(/.*|$) https://docs.openstack.org/infra/shade$1 [last,redirect=permanent] + RewriteRule ^/shade(/.*|$) https://docs.openstack.org/shade/latest$1 [last,redirect=permanent] RewriteRule ^/storyboard(/.*|$) https://docs.openstack.org/infra/storyboard$1 [last,redirect=permanent] - RewriteRule ^/zuul(/.*|$) https://docs.openstack.org/infra/zuul$1 [last,redirect=permanent] + RewriteRule ^/zuul(/.*|$) https://zuul-ci.org/docs/zuul$1 [last,redirect=permanent] RewriteRule ^/(.*) https://docs.openstack.org/infra/system-config/$1 [last,redirect=permanent] diff --git a/playbooks/roles/static/files/50-cinder.openstack.org.conf b/playbooks/roles/static/files/50-cinder.openstack.org.conf index e5a31f8e0e..889b7838a6 100644 --- a/playbooks/roles/static/files/50-cinder.openstack.org.conf +++ b/playbooks/roles/static/files/50-cinder.openstack.org.conf @@ -2,7 +2,7 @@ ServerName cinder.openstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/cinder/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/cinder/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/cinder.openstack.org_error.log @@ -22,7 +22,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/cinder/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/cinder/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/cinder.openstack.org_error.log diff --git a/playbooks/roles/static/files/50-devstack.org.conf b/playbooks/roles/static/files/50-devstack.org.conf index 337c417937..c6b34887c0 100644 --- a/playbooks/roles/static/files/50-devstack.org.conf +++ b/playbooks/roles/static/files/50-devstack.org.conf @@ -3,7 +3,7 @@ ServerAlias *.devstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/devstack/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/devstack/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/devstack.org_error.log @@ -24,7 +24,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/devstack/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/devstack/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/devstack.org_error.log diff --git a/playbooks/roles/static/files/50-glance.openstack.org.conf b/playbooks/roles/static/files/50-glance.openstack.org.conf index 45817ecdd9..fc1cd8e5c5 100644 --- a/playbooks/roles/static/files/50-glance.openstack.org.conf +++ b/playbooks/roles/static/files/50-glance.openstack.org.conf @@ -2,7 +2,7 @@ ServerName glance.openstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/glance/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/glance/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/glance.openstack.org_error.log @@ -22,7 +22,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/glance/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/glance/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/glance.openstack.org_error.log diff --git a/playbooks/roles/static/files/50-horizon.openstack.org.conf b/playbooks/roles/static/files/50-horizon.openstack.org.conf index c86ec4d5e7..853e1742e4 100644 --- a/playbooks/roles/static/files/50-horizon.openstack.org.conf +++ b/playbooks/roles/static/files/50-horizon.openstack.org.conf @@ -2,7 +2,7 @@ ServerName horizon.openstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/horizon/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/horizon/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/horizon.openstack.org_error.log @@ -22,7 +22,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/horizon/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/horizon/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/horizon.openstack.org_error.log diff --git a/playbooks/roles/static/files/50-keystone.openstack.org.conf b/playbooks/roles/static/files/50-keystone.openstack.org.conf index c7c833fc32..2e80b8f221 100644 --- a/playbooks/roles/static/files/50-keystone.openstack.org.conf +++ b/playbooks/roles/static/files/50-keystone.openstack.org.conf @@ -2,7 +2,7 @@ ServerName keystone.openstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/keystone/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/keystone/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/keystone.openstack.org_error.log @@ -22,7 +22,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/keystone/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/keystone/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/keystone.openstack.org_error.log diff --git a/playbooks/roles/static/files/50-nova.openstack.org.conf b/playbooks/roles/static/files/50-nova.openstack.org.conf index e5aac7120a..d36c3e0b9e 100644 --- a/playbooks/roles/static/files/50-nova.openstack.org.conf +++ b/playbooks/roles/static/files/50-nova.openstack.org.conf @@ -2,7 +2,7 @@ ServerName nova.openstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/nova/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/nova/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/nova.openstack.org_error.log @@ -22,7 +22,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/nova/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/nova/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/nova.openstack.org_error.log diff --git a/playbooks/roles/static/files/50-qa.openstack.org.conf b/playbooks/roles/static/files/50-qa.openstack.org.conf index 18c6fe63e9..7f51162d6d 100644 --- a/playbooks/roles/static/files/50-qa.openstack.org.conf +++ b/playbooks/roles/static/files/50-qa.openstack.org.conf @@ -2,7 +2,7 @@ ServerName qa.openstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/qa/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/ [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/qa.openstack.org_error.log @@ -22,7 +22,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/qa/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/ [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/qa.openstack.org_error.log diff --git a/playbooks/roles/static/files/50-swift.openstack.org.conf b/playbooks/roles/static/files/50-swift.openstack.org.conf index 80fa790f08..d633ec3f75 100644 --- a/playbooks/roles/static/files/50-swift.openstack.org.conf +++ b/playbooks/roles/static/files/50-swift.openstack.org.conf @@ -2,7 +2,7 @@ ServerName swift.openstack.org RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/swift/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/swift/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/swift.openstack.org_error.log @@ -22,7 +22,7 @@ SSLHonorCipherOrder on RewriteEngine On - RewriteRule ^/(.*) https://docs.openstack.org/developer/swift/$1 [last,redirect=permanent] + RewriteRule ^/(.*) https://docs.openstack.org/swift/latest/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/swift.openstack.org_error.log diff --git a/testinfra/test_static.py b/testinfra/test_static.py index 9cad8a2b1e..05745ddbca 100644 --- a/testinfra/test_static.py +++ b/testinfra/test_static.py @@ -158,15 +158,15 @@ def test_git_redirects(host, url, target): assert target in cmd.stdout doc_redirects = ( - ('devstack.org', 'https://docs.openstack.org/developer/devstack'), - ('www.devstack.org', 'https://docs.openstack.org/developer/devstack'), - ('cinder.openstack.org', 'https://docs.openstack.org/developer/cinder'), - ('glance.openstack.org', 'https://docs.openstack.org/developer/glance'), - ('horizon.openstack.org', 'https://docs.openstack.org/developer/horizon'), - ('keystone.openstack.org', 'https://docs.openstack.org/developer/keystone'), - ('nova.openstack.org', 'https://docs.openstack.org/developer/nova'), - ('qa.openstack.org', 'https://docs.openstack.org/developer/qa'), - ('swift.openstack.org', 'https://docs.openstack.org/developer/swift'), + ('devstack.org', 'https://docs.openstack.org/devstack/latest'), + ('www.devstack.org', 'https://docs.openstack.org/devstack/latest'), + ('cinder.openstack.org', 'https://docs.openstack.org/cinder/latest'), + ('glance.openstack.org', 'https://docs.openstack.org/glance/latest'), + ('horizon.openstack.org', 'https://docs.openstack.org/horizon/latest'), + ('keystone.openstack.org', 'https://docs.openstack.org/keystone/latest'), + ('nova.openstack.org', 'https://docs.openstack.org/nova/latest'), + ('qa.openstack.org', 'https://docs.openstack.org/'), + ('swift.openstack.org', 'https://docs.openstack.org/swift/latest'), ) @pytest.mark.parametrize("hostname,target", doc_redirects) @@ -197,9 +197,9 @@ ci_redirects = ( ('/jenkins-job-builder', 'https://docs.openstack.org/infra/jenkins-job-builder'), ('/nodepool', 'https://docs.openstack.org/infra/nodepool'), ('/openstackid', 'https://docs.openstack.org/infra/openstackid'), - ('/shade', 'https://docs.openstack.org/infra/shade'), + ('/shade', 'https://docs.openstack.org/shade/latest'), ('/storyboard', 'https://docs.openstack.org/infra/storyboard'), - ('/zuul', 'https://docs.openstack.org/infra/zuul'), + ('/zuul', 'https://zuul-ci.org/docs/zuul'), ('/', 'https://docs.openstack.org/infra/system-config/'), )