zuul-jobs/test-playbooks/registry/buildset-registry-k8s-docker.yaml
James E. Blair 91ae8e62de Test buildset registry with k8s and docker
This adds a test job for the buildset registry with k8s with the
docker runtime.

Change-Id: I0ec1d3d5980424f85f5e7619b9dec96c8f0f70f1
2019-10-28 15:45:39 -07:00

27 lines
1.1 KiB
YAML

- hosts: all
roles:
- role: clear-firewall
- role: install-kubernetes
- 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 --generator=run-pod/v1 --image=zuul/docker-testimage dockertest
- name: Wait for the pod to be ready
command: kubectl wait --for=condition=Ready pod/dockertest --timeout=60s
- name: Check the output of the pod
shell: "kubectl logs pod/dockertest | grep 'Zuul container test'"
- name: Run a remote test pod
command: kubectl run --generator=run-pod/v1 --image=debian:testing upstream-dockertest --command -- /bin/bash -c 'echo Upstream; sleep infinity'
- 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'"