zuul-jobs/test-playbooks/registry/buildset-registry-k8s-docker.yaml
Mohammed Naser ae05322a85 install-docker: add option to use buildset registry
At the moment, the build registry is not used inside Kubernetes jobs
and it is required to override the entire pre.yaml just to enable it.

This patch adds an option of using docker_use_buildset_registry inside
install-docker which can be used in order to install Docker and letting
it use the buildset registry simply by adjusting the job.vars

Change-Id: I1b42eac6accbf7c350aee76d18a823ba6327548d
2020-03-14 18:30:39 -04:00

26 lines
1.0 KiB
YAML

- hosts: all
roles:
- role: clear-firewall
- role: install-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'"