zuul-jobs/test-playbooks/registry/buildset-registry-k8s-microk8s.yaml
Ian Wienand 65aa2bdc1f use-buildset-registry: support microk8s
This enables microk8s/containerd to pull through the intermediate zuul
registry.  This is tested with the new
zuul-jobs-test-registry-buildset-registry-k8s-microk8s job.

Change-Id: I5a6c0d63a6ba0acf94ab9f0ef94777fab58fec6e
2023-01-09 10:37:45 -08:00

52 lines
1.4 KiB
YAML

- hosts: all
roles:
- role: clear-firewall
- role: ensure-kubernetes
vars:
ensure_kubernetes_type: microk8s
- role: use-buildset-registry
buildset_registry_docker_user: root
tasks:
- name: Wait for cluster to come up
command: kubectl cluster-info
register: result
until: result.rc == 0
retries: 5
delay: 30
- name: Run a local test pod
command: kubectl run --image=quay.io/zuul/quay-testimage quaytest
- name: Pause
pause:
seconds: 60
- name: Describe pod
shell: kubectl describe pods quaytest
- name: Wait for the pod to be ready
command: kubectl wait --for=condition=Ready pod/quaytest --timeout=60s
- name: Check the output of the pod
shell: "kubectl logs pod/quaytest | grep 'Zuul container test'"
args:
warn: false
- name: Run a remote test pod
command: kubectl run --image=docker.io/debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
- name: Pause
pause:
seconds: 60
- name: Describe pod
shell: kubectl describe pods upstream-dockertest
- name: Wait for the pod to be ready
command: kubectl wait --for=condition=Ready pod/upstream-dockertest --timeout=60s
- name: Check the output of the pod
shell: "kubectl logs pod/upstream-dockertest | grep 'Upstream'"
args:
warn: false