From 529190ddfaa182d2bbe086cb61fdb7a6913afbe2 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 24 Oct 2019 15:09:30 +0300 Subject: [PATCH] Allow upper-constraints redirect based on SHA This patch aims to make possible to provide SHA commit for https://releases.openstack.org/constraints/upper/ URL in addition to branch or tag. This is heavily used by OSA to be sure that every time role is runned under some release it will install the same package versions. And to be consistent and use releases.openstack.org for contraints not only in tox but in role itself this patch is needed. Change-Id: I1ce0af2ab2163ea1f154516229889b3cf8813ab6 --- doc/source/_templates/htaccess | 1 + doc/source/_templates/redirect-tests | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/source/_templates/htaccess b/doc/source/_templates/htaccess index d0ebafc75a..bcc7478882 100644 --- a/doc/source/_templates/htaccess +++ b/doc/source/_templates/htaccess @@ -3,4 +3,5 @@ redirect 301 /constraints/upper/master https://opendev.org/openstack/requirement {%- for redirection in redirections %} redirect {{ redirection.code }} /constraints/upper/{{ redirection.src }} https://opendev.org/openstack/requirements/raw/{{ redirection.ref_type }}/{{ redirection.dst }}/upper-constraints.txt {%- endfor %} +redirectmatch 302 ^/constraints/upper/([0-9a-f]{40})$ https://opendev.org/openstack/requirements/raw/commit/$1/upper-constraints.txt diff --git a/doc/source/_templates/redirect-tests b/doc/source/_templates/redirect-tests index 65901ab274..551813a007 100644 --- a/doc/source/_templates/redirect-tests +++ b/doc/source/_templates/redirect-tests @@ -3,3 +3,4 @@ {%- for redirection in redirections %} /constraints/upper/{{ redirection.src }} {{ redirection.code }} https://opendev.org/openstack/requirements/raw/{{ redirection.ref_type }}/{{ redirection.dst }}/upper-constraints.txt {%- endfor %} +/constraints/upper/5d2dc701ab2fe7e87d78e4d96eb444766eef6725 302 https://opendev.org/openstack/requirements/raw/commit/5d2dc701ab2fe7e87d78e4d96eb444766eef6725/upper-constraints.txt