Merge "Add cri-o support to use-buildset registry"

This commit is contained in:
Zuul 2020-01-09 16:49:54 +00:00 committed by Gerrit Code Review
commit 1e378f4071
4 changed files with 76 additions and 0 deletions

View File

@ -105,3 +105,15 @@
when: buildset_registry_docker_user is not defined when: buildset_registry_docker_user is not defined
block: block:
- include_tasks: user-config.yaml - include_tasks: user-config.yaml
- name: Check if cri-o is installed
stat:
path: /etc/crio/crio.conf
register: crio_path
# TODO: with cri-o >= 1.16, change this to a SIGHUP of the crio process
- name: Restart cri-o
when: crio_path.stat.exists
service:
name: crio
state: restarted
become: true

View File

@ -0,0 +1,8 @@
- hosts: all
tasks:
- name: Describe dockertest pod
command: kubectl describe pod/quaytest
ignore_errors: true
- name: Describe upstream-dockertest pod
command: kubectl describe pod/upstream-dockertest
ignore_errors: true

View File

@ -0,0 +1,31 @@
- hosts: all
roles:
- role: clear-firewall
- role: install-kubernetes
vars:
minikube_dns_resolvers:
- '1.1.1.1'
- '8.8.8.8'
kubernetes_runtime: cri-o
- 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=quay.io/zuul/quay-testimage 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'"
- 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'"

View File

@ -111,6 +111,30 @@
vars: vars:
container_command: docker container_command: docker
- job:
name: zuul-jobs-test-registry-buildset-registry-k8s-crio
dependencies: zuul-jobs-test-registry-buildset-registry
description: |
Test a buildset registry with kubernetes and CRIO
It is not meant to be used directly but rather run on changes
to roles in the zuul-jobs repo.
files:
- roles/pull-from-intermediate-registry/.*
- roles/push-to-intermediate-registry/.*
- roles/install-docker/.*
- roles/install-kubernetes/.*
- roles/build-docker-image/.*
- roles/run-buildset-registry/.*
- roles/use-buildset-registry/.*
- test-playbooks/registry/.*
run: test-playbooks/registry/buildset-registry-k8s-crio.yaml
post-run:
- test-playbooks/registry/buildset-registry-k8s-crio-post.yaml
- test-playbooks/registry/test-registry-post.yaml
vars:
container_command: podman
- job: - job:
name: zuul-jobs-test-registry-buildset-registry-openshift-docker name: zuul-jobs-test-registry-buildset-registry-openshift-docker
dependencies: zuul-jobs-test-registry-buildset-registry dependencies: zuul-jobs-test-registry-buildset-registry
@ -193,6 +217,7 @@
- zuul-jobs-test-registry-podman - zuul-jobs-test-registry-podman
- zuul-jobs-test-registry-buildset-registry - zuul-jobs-test-registry-buildset-registry
- zuul-jobs-test-registry-buildset-registry-k8s-docker - zuul-jobs-test-registry-buildset-registry-k8s-docker
- zuul-jobs-test-registry-buildset-registry-k8s-crio
- zuul-jobs-test-registry-buildset-registry-openshift-docker - zuul-jobs-test-registry-buildset-registry-openshift-docker
- zuul-jobs-test-install-kubernetes-docker - zuul-jobs-test-install-kubernetes-docker
- zuul-jobs-test-install-kubernetes-crio - zuul-jobs-test-install-kubernetes-crio