From ff4e4905daeb7e65f3fae765fab9f7a0a2ac74a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20M=C3=ADchal?= Date: Mon, 31 Aug 2020 14:12:34 +0200 Subject: [PATCH] zuul, playbooks: Enable system tests on Fedora 33 https://github.com/containers/toolbox/pull/550 --- .zuul.yaml | 11 ++++++++ playbooks/fedora-33/pre-common.yaml | 13 ++++++++++ playbooks/fedora-33/setup-env.yaml | 26 +++++++++++++++++++ .../fedora-33/system-test-fedora-33.yaml | 21 +++++++++++++++ 4 files changed, 71 insertions(+) create mode 100644 playbooks/fedora-33/pre-common.yaml create mode 100644 playbooks/fedora-33/setup-env.yaml create mode 100644 playbooks/fedora-33/system-test-fedora-33.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 44bc1cc..774b7ef 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -31,6 +31,17 @@ pre-run: playbooks/fedora-32/setup-env.yaml run: playbooks/fedora-32/system-test-fedora-32.yaml +- job: + name: system-test-fedora-33 + description: Run Toolbox's system tests in Fedora 33 + timeout: 1200 + nodeset: + nodes: + - name: ci-node-33 + label: cloud-fedora-33-small + pre-run: playbooks/fedora-33/setup-env.yaml + run: playbooks/fedora-33/system-test-fedora-33.yaml + - job: name: system-test-fedora-rawhide description: Run Toolbox's system tests in Fedora Rawhide diff --git a/playbooks/fedora-33/pre-common.yaml b/playbooks/fedora-33/pre-common.yaml new file mode 100644 index 0000000..52df121 --- /dev/null +++ b/playbooks/fedora-33/pre-common.yaml @@ -0,0 +1,13 @@ +- name: Pull registry.fedoraproject.org/f33/fedora-toolbox + command: podman pull registry.fedoraproject.org/f33/fedora-toolbox + register: _podman + until: _podman.rc == 0 + retries: 5 + delay: 10 + +- name: Pull registry.fedoraproject.org/f29/fedora-toolbox + command: podman pull registry.fedoraproject.org/f29/fedora-toolbox + register: _podman + until: _podman.rc == 0 + retries: 5 + delay: 10 diff --git a/playbooks/fedora-33/setup-env.yaml b/playbooks/fedora-33/setup-env.yaml new file mode 100644 index 0000000..0a53542 --- /dev/null +++ b/playbooks/fedora-33/setup-env.yaml @@ -0,0 +1,26 @@ +--- +- hosts: all + tasks: + - name: Install requirements + become: yes + package: + use: dnf + name: + - golang + - golang-github-cpuguy83-md2man + - ninja-build + - meson + - flatpak-session-helper + - systemd + - bats + - bash-completion + - udisks2 + - podman + + - name: Setup environment (create missing /run/media) + command: sudo systemd-tmpfiles --create + + - name: Check versions of crucial packages + command: rpm -q golang podman crun conmon fuse-overlayfs flatpak-session-helper + + - include_tasks: ./pre-common.yaml diff --git a/playbooks/fedora-33/system-test-fedora-33.yaml b/playbooks/fedora-33/system-test-fedora-33.yaml new file mode 100644 index 0000000..467904b --- /dev/null +++ b/playbooks/fedora-33/system-test-fedora-33.yaml @@ -0,0 +1,21 @@ +--- +- hosts: ci-node-33 + tasks: + - name: Build toolbox + command: meson builddir + args: + chdir: '{{ zuul.project.src_dir }}' + + - name: Install toolbox + become: yes + command: ninja -C builddir install + args: + chdir: '{{ zuul.project.src_dir }}' + + - name: Run system tests + command: bats ./test/system + environment: + PODMAN: '/usr/bin/podman' + TOOLBOX: '/usr/local/bin/toolbox' + args: + chdir: '{{ zuul.project.src_dir }}'