diff --git a/roles/ensure-kubernetes/tasks/main.yaml b/roles/ensure-kubernetes/tasks/main.yaml index f5bf559c3..f1d9bbecd 100644 --- a/roles/ensure-kubernetes/tasks/main.yaml +++ b/roles/ensure-kubernetes/tasks/main.yaml @@ -5,21 +5,11 @@ - name: Install minikube when: ensure_kubernetes_type == 'minikube' block: - - name: Add all repositories - include_role: - name: ensure-package-repositories - vars: - repositories_keys: - - url: https://packages.cloud.google.com/apt/doc/apt-key.gpg - repositories_list: - - repo: deb http://apt.kubernetes.io/ kubernetes-xenial main - - - name: Install kubernetes packages and dependencies + - name: Install kubernetes dependencies become: yes apt: name: - conntrack - - kubectl - liblz4-tool update_cache: yes diff --git a/roles/ensure-kubernetes/tasks/minikube.yaml b/roles/ensure-kubernetes/tasks/minikube.yaml index 6db62c925..063358e24 100644 --- a/roles/ensure-kubernetes/tasks/minikube.yaml +++ b/roles/ensure-kubernetes/tasks/minikube.yaml @@ -10,6 +10,13 @@ mode: 0755 when: not stat_result.stat.exists +- name: Install kubectl as minikube + become: true + file: + src: /tmp/minikube + dest: /usr/local/bin/kubectl + state: link + - name: Run ensure-docker role include_role: name: ensure-docker diff --git a/zuul-tests.d/container-roles-jobs.yaml b/zuul-tests.d/container-roles-jobs.yaml index 2a4ab9e84..fd52993fe 100644 --- a/zuul-tests.d/container-roles-jobs.yaml +++ b/zuul-tests.d/container-roles-jobs.yaml @@ -354,68 +354,66 @@ post-run: - test-playbooks/registry/test-registry-post.yaml -# FIXME(yoctozepto): crio jobs are disabled because their repository seems to be broken +- 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 -# - 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/ensure-docker/.* + - roles/ensure-kubernetes/.* + - roles/ensure-package-repositories/.* + - 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 -# 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/ensure-docker/.* -# - roles/ensure-kubernetes/.* -# - roles/ensure-package-repositories/.* -# - 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: + name: zuul-jobs-test-ensure-kubernetes-crio + description: | + Test the ensure-kubernetes role with crio-o -# - job: -# name: zuul-jobs-test-ensure-kubernetes-crio -# description: | -# Test the ensure-kubernetes role with crio-o + This job tests changes to the ensure-kubernetes roles. It + is not meant to be used directly but rather run on changes to + roles in the zuul-jobs repo. + # Does not work under ubuntu-bionic + abstract: true + files: + - roles/ensure-docker/.* + - roles/ensure-kubernetes/.* + - roles/ensure-package-repositories/.* + - test-playbooks/ensure-kubernetes/.* + run: test-playbooks/ensure-kubernetes/crio.yaml + post-run: test-playbooks/ensure-kubernetes/post.yaml -# This job tests changes to the ensure-kubernetes roles. It -# is not meant to be used directly but rather run on changes to -# roles in the zuul-jobs repo. -# # Does not work under ubuntu-bionic -# abstract: true -# files: -# - roles/ensure-docker/.* -# - roles/ensure-kubernetes/.* -# - roles/ensure-package-repositories/.* -# - test-playbooks/ensure-kubernetes/.* -# run: test-playbooks/ensure-kubernetes/crio.yaml -# post-run: test-playbooks/ensure-kubernetes/post.yaml +- job: + name: zuul-jobs-test-ensure-kubernetes-crio-ubuntu-focal + description: Test the ensure-kubernetes role with crio-o on ubuntu-focal + parent: zuul-jobs-test-ensure-kubernetes-crio + nodeset: + nodes: + - name: ubuntu-focal + label: ubuntu-focal -# - job: -# name: zuul-jobs-test-ensure-kubernetes-crio-ubuntu-focal -# description: Test the ensure-kubernetes role with crio-o on ubuntu-focal -# parent: zuul-jobs-test-ensure-kubernetes-crio -# nodeset: -# nodes: -# - name: ubuntu-focal -# label: ubuntu-focal - -# - job: -# name: zuul-jobs-test-ensure-kubernetes-crio-ubuntu-jammy -# description: Test the ensure-kubernetes role with crio-o on ubuntu-jammy -# parent: zuul-jobs-test-ensure-kubernetes-crio -# nodeset: -# nodes: -# - name: ubuntu-jammy -# label: ubuntu-jammy +- job: + name: zuul-jobs-test-ensure-kubernetes-crio-ubuntu-jammy + description: Test the ensure-kubernetes role with crio-o on ubuntu-jammy + parent: zuul-jobs-test-ensure-kubernetes-crio + nodeset: + nodes: + - name: ubuntu-jammy + label: ubuntu-jammy - job: name: zuul-jobs-test-ensure-kubernetes-microk8s @@ -593,6 +591,9 @@ - zuul-jobs-test-registry-podman - zuul-jobs-test-registry-buildset-registry - zuul-jobs-test-registry-buildset-registry-k8s-microk8s + - zuul-jobs-test-registry-buildset-registry-k8s-crio + - zuul-jobs-test-ensure-kubernetes-crio-ubuntu-focal + - zuul-jobs-test-ensure-kubernetes-crio-ubuntu-jammy - zuul-jobs-test-ensure-kubernetes-microk8s-ubuntu-jammy - zuul-jobs-test-ensure-kubernetes-microk8s-debian-bookworm - zuul-jobs-test-ensure-skopeo-debian-bookworm