Add a functional test for registry.zuul-ci.org
Change-Id: I1fa239275100b91db2fa67bfd3d60d7d27b6aaa0
This commit is contained in:
parent
6745591369
commit
e701fdd3ca
@ -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
|
||||
|
32
playbooks/test-static.yaml
Normal file
32
playbooks/test-static.yaml
Normal 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
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user