Add a functional test for registry.zuul-ci.org

Change-Id: I1fa239275100b91db2fa67bfd3d60d7d27b6aaa0
This commit is contained in:
Ian Wienand 2023-03-20 11:20:30 +11:00 committed by James E. Blair
parent 6745591369
commit e701fdd3ca
3 changed files with 36 additions and 1 deletions

View File

@ -34,7 +34,8 @@
AllowOverride None
</Directory>
RewriteRule ^/v2/(.*)$ https://quay.io/v2/corvus/$1 [R=302,L]
RewriteRule ^/v1/(.*)$ https://quay.io/v1/$1 [R=302,L]
RewriteRule ^/v2/(.+)$ https://quay.io/v2/corvus/$1 [R=302,L]
ErrorLog /var/log/apache2/registry.zuul-ci.org_error.log
LogLevel warn

View File

@ -0,0 +1,32 @@
- hosts: "prod_bastion[0]"
tasks:
# Do a test pull through the HTTP redirect registry site running
# on the static host.
- name: Add registry redirect hosts
lineinfile:
dest: /etc/hosts
regexp: '.*{{ item.registry }}$'
line: '{{ hostvars[item.host].ansible_host }} {{ item.registry }}'
state: present
loop:
- { 'host' : 'static99.opendev.org',
'registry': 'registry.zuul-ci.org' }
- name: Do a test docker pull through redirect
command: docker pull registry.zuul-ci.org/zuul:8.2.0
register: _docker_pull
- name: Check output
assert:
that: '"Digest: sha256:4a54086c286a7f12434d3d0fb620081c5d967c5fe335229a239155913662f4a1" in _docker_pull.stdout'
- name: Install podman
package:
name: podman
state: present
- name: Do a test podman pull through redirect
command: podman --log-level=debug pull registry.zuul-ci.org/zuul:8.2.0
register: _podman_pull

View File

@ -1157,12 +1157,14 @@
run_playbooks:
- playbooks/letsencrypt.yaml
- playbooks/service-static.yaml
run_test_playbook: playbooks/test-static.yaml
files:
- playbooks/bootstrap-bridge.yaml
- playbooks/roles/static/
- playbooks/roles/letsencrypt
- playbooks/letsencrypt.yaml
- playbooks/service-static.yaml
- playbooks/test-static.yaml
- testinfra/test_static.py
host-vars:
static99.opendev.org: