zuul-jobs/test-playbooks/registry/buildset-registry-k8s-docker.yaml
vass fcf3202ba4 Rename install-kubernetes to ensure-kubernetes for consistency
The old role will be kept and include ensure-kubernetes for backwards compatability.

Change-Id: Ic0c18a833f4a07e123f8313673bd9c864d7d2919
2020-04-04 15:41:29 -04:00

26 lines
1.0 KiB
YAML

- hosts: all
roles:
- role: clear-firewall
- role: ensure-kubernetes
docker_use_buildset_registry: true
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'"