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

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

28 lines
1.1 KiB
YAML

- hosts: all
roles:
- role: clear-firewall
- role: ensure-openshift
- role: use-buildset-registry
buildset_registry_docker_user: root
- role: deploy-openshift
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: oc run --generator=run-pod/v1 --image=zuul/docker-testimage dockertest
- name: Wait for the pod to be ready
command: oc wait --for=condition=Ready pod/dockertest --timeout=60s
- name: Check the output of the pod
shell: "oc logs pod/dockertest | grep 'Zuul container test'"
- name: Run a remote test pod
command: oc 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: oc wait --for=condition=Ready pod/upstream-dockertest --timeout=60s
- name: Check the output of the pod
shell: "oc logs pod/upstream-dockertest | grep 'Upstream'"