From b5003bffbed2c4c6753440bc07fea515b5327f83 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Wed, 20 Dec 2023 07:55:40 -0500 Subject: [PATCH] Add Zuul CI configuration This allows us to have pull requests tested before we review changes to merge. --- .fmf/version | 1 + .zuul.yaml | 26 ++++++++++++++++++++++++++ README.md | 5 +++++ tmt/plans/build-aws.fmf | 8 ++++++++ tmt/plans/build-azure.fmf | 8 ++++++++ tmt/plans/build-gcp.fmf | 8 ++++++++ tmt/plans/build-openstack.fmf | 8 ++++++++ tmt/plans/build-vagrant-libvirt.fmf | 8 ++++++++ tmt/plans/build-vagrant-virtualbox.fmf | 11 +++++++++++ tmt/tests/build-image.fmf | 11 +++++++++++ 10 files changed, 94 insertions(+) create mode 100644 .fmf/version create mode 100644 .zuul.yaml create mode 100644 tmt/plans/build-aws.fmf create mode 100644 tmt/plans/build-azure.fmf create mode 100644 tmt/plans/build-gcp.fmf create mode 100644 tmt/plans/build-openstack.fmf create mode 100644 tmt/plans/build-vagrant-libvirt.fmf create mode 100644 tmt/plans/build-vagrant-virtualbox.fmf create mode 100644 tmt/tests/build-image.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..1a0971b --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,26 @@ +--- +- job: + name: build-images-x86_64 + parent: tmt-test + vars: + tmt_url: "https://pagure.io/{{ zuul.project.name }}" + tmt_ref: "{{ zuul.ref }}" + distro: fedora-rawhide + compose: Fedora-latest + tf_arch: x86_64 + +- job: + name: build-images-aarch64 + parent: tmt-test + vars: + tmt_url: "https://pagure.io/{{ zuul.project.name }}" + tmt_ref: "{{ zuul.ref }}" + distro: fedora-rawhide + compose: Fedora-latest + tf_arch: aarch64 + +- project: + check: + jobs: + - build-images-x86_64 + - build-images-aarch64 diff --git a/README.md b/README.md index 8b0a2bb..8f8b05f 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ Set up your development environment and run the image build (substitute ` --image-profile= --output-dir ./outdir ``` +## CI information + +This project is tested using the Software Factory Zuul CI instance +using the [Test Management Tool](https://tmt.readthedocs.io/). + ## Licensing This is free software: you can redistribute it and/or modify diff --git a/tmt/plans/build-aws.fmf b/tmt/plans/build-aws.fmf new file mode 100644 index 0000000..7f6a327 --- /dev/null +++ b/tmt/plans/build-aws.fmf @@ -0,0 +1,8 @@ +summary: Build AWS EC2 image +discover: + how: fmf +environment: + image_type: oem + image_profile: Cloud-AmazonEC2 +execute: + how: tmt diff --git a/tmt/plans/build-azure.fmf b/tmt/plans/build-azure.fmf new file mode 100644 index 0000000..6b43b63 --- /dev/null +++ b/tmt/plans/build-azure.fmf @@ -0,0 +1,8 @@ +summary: Build Azure image +discover: + how: fmf +environment: + image_type: oem + image_profile: Cloud-Azure +execute: + how: tmt diff --git a/tmt/plans/build-gcp.fmf b/tmt/plans/build-gcp.fmf new file mode 100644 index 0000000..f5945da --- /dev/null +++ b/tmt/plans/build-gcp.fmf @@ -0,0 +1,8 @@ +summary: Build GCP image +discover: + how: fmf +environment: + image_type: oem + image_profile: Cloud-GCE +execute: + how: tmt diff --git a/tmt/plans/build-openstack.fmf b/tmt/plans/build-openstack.fmf new file mode 100644 index 0000000..3f0eb22 --- /dev/null +++ b/tmt/plans/build-openstack.fmf @@ -0,0 +1,8 @@ +summary: Build OpenStack image +discover: + how: fmf +environment: + image_type: oem + image_profile: Cloud-OpenStack +execute: + how: tmt diff --git a/tmt/plans/build-vagrant-libvirt.fmf b/tmt/plans/build-vagrant-libvirt.fmf new file mode 100644 index 0000000..7240ed1 --- /dev/null +++ b/tmt/plans/build-vagrant-libvirt.fmf @@ -0,0 +1,8 @@ +summary: Build Vagrant image for libvirt +discover: + how: fmf +environment: + image_type: oem + image_profile: Vagrant-libvirt +execute: + how: tmt diff --git a/tmt/plans/build-vagrant-virtualbox.fmf b/tmt/plans/build-vagrant-virtualbox.fmf new file mode 100644 index 0000000..d850aa8 --- /dev/null +++ b/tmt/plans/build-vagrant-virtualbox.fmf @@ -0,0 +1,11 @@ +summary: Build Vagrant image for VirtualBox +discover: + how: fmf +adjust: + enabled: false + when: arch != x86_64 +environment: + image_type: oem + image_profile: Vagrant-VirtualBox +execute: + how: tmt diff --git a/tmt/tests/build-image.fmf b/tmt/tests/build-image.fmf new file mode 100644 index 0000000..4bbfac6 --- /dev/null +++ b/tmt/tests/build-image.fmf @@ -0,0 +1,11 @@ +summary: Build image +require: + - distribution-gpg-keys + - git-core + - kiwi + - libselinux-utils +framework: shell +path: / +test: | + ./kiwi-build --debug --image-type="$image_type" --image-profile="$image_profile" --kiwi-description-dir="${TMT_TREE}" --output-dir="${TMT_TEST_DATA}" +duration: 60m