From 58ea94f31abe8461deb74010d21491be4eaced6d Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Sun, 29 Oct 2023 16:46:36 +0100 Subject: [PATCH] Onboard tmt --- .fmf/version | 1 + .packit.yml | 10 ++++++ plans/integration/behave-dnf5.fmf | 4 +++ plans/integration/behave-dnf5daemon.fmf | 4 +++ plans/main.fmf | 41 +++++++++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 .fmf/version create mode 100644 .packit.yml create mode 100644 plans/integration/behave-dnf5.fmf create mode 100644 plans/integration/behave-dnf5daemon.fmf create mode 100644 plans/main.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.packit.yml b/.packit.yml new file mode 100644 index 000000000..eb0a28487 --- /dev/null +++ b/.packit.yml @@ -0,0 +1,10 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +jobs: + - job: tests + trigger: pull_request + targets: + - fedora-all + manual_trigger: true + skip_build: true diff --git a/plans/integration/behave-dnf5.fmf b/plans/integration/behave-dnf5.fmf new file mode 100644 index 000000000..844cd54a4 --- /dev/null +++ b/plans/integration/behave-dnf5.fmf @@ -0,0 +1,4 @@ +summary: Run Behave Test Suite - DNF5 +execute: + how: tmt + script: $TMT_PLANS_DATA/ci-dnf-stack/container-test run --tags dnf5 --command dnf5 diff --git a/plans/integration/behave-dnf5daemon.fmf b/plans/integration/behave-dnf5daemon.fmf new file mode 100644 index 000000000..b132597f4 --- /dev/null +++ b/plans/integration/behave-dnf5daemon.fmf @@ -0,0 +1,4 @@ +summary: Run Behave Test Suite - DNF5DAEMON +execute: + script: + - $TMT_PLANS_DATA/ci-dnf-stack/container-test run --tags dnf5daemon --command dnf5daemon-client diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 000000000..55ddcf8bb --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,41 @@ +summary: Prepare CI DNF Stack +adjust: + - when: distro == fedora-37 + environment: + BASE: "fedora:37" + - when: distro == fedora-38 + environment: + BASE: "fedora:38" + - when: distro == fedora-39 + environment: + BASE: "fedora:39" + - when: distro == fedora-rawhide + environment: + BASE: "fedora:rawhide" + +prepare: + - name: Install packages to build fedora container + how: install + package: [git, podman] + + - name: Download latest ci-dnf-stack from PR + how: shell + script: + - git clone https://github.com/rpm-software-management/ci-dnf-stack $TMT_PLANS_DATA/ci-dnf-stack + + - name: Checkout PR branch if packit call is from ci-dnf-stack + how: shell + script: | + if [ "$PACKIT_UPSTREAM_NAME" -eq "ci-dnf-stack" ]; then \ + git -C $TMT_PLANS_DATA/ci-dnf-stack remote add pull-request $PACKIT_SOURCE_URL \ + git -C $TMT_PLANS_DATA/ci-dnf-stack fetch pull-request \ + git -C $TMT_PLANS_DATA/ci-dnf-stack checkout --track \ pull-request/$PACKIT_SOURCE_BRANCH + fi + + - name: Build testing container + how: shell + script: | + $TMT_PLANS_DATA/ci-dnf-stack/container-test build \ + --base $BASE \ + --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \ + --container-arg="--env=RPMS=$PACKIT_COPR_RPMS"