From 3433ae65cbe9e330284005f666871b8fb7224d25 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Tue, 9 Jan 2024 14:32:51 +0100 Subject: [PATCH] Logic rework of fmf files and add dnf4 build steps --- plans/{ => dnf4}/integration/behave-dnf.fmf | 0 plans/dnf4/main.fmf | 36 +++++++++++++++++++ .../integration/behave-createrepo_c.fmf | 0 plans/{ => dnf5}/integration/behave-dnf5.fmf | 0 .../integration/behave-dnf5daemon.fmf | 0 plans/dnf5/main.fmf | 31 ++++++++++++++++ plans/main.fmf | 27 ++------------ 7 files changed, 69 insertions(+), 25 deletions(-) rename plans/{ => dnf4}/integration/behave-dnf.fmf (100%) create mode 100644 plans/dnf4/main.fmf rename plans/{ => dnf5}/integration/behave-createrepo_c.fmf (100%) rename plans/{ => dnf5}/integration/behave-dnf5.fmf (100%) rename plans/{ => dnf5}/integration/behave-dnf5daemon.fmf (100%) create mode 100644 plans/dnf5/main.fmf diff --git a/plans/integration/behave-dnf.fmf b/plans/dnf4/integration/behave-dnf.fmf similarity index 100% rename from plans/integration/behave-dnf.fmf rename to plans/dnf4/integration/behave-dnf.fmf diff --git a/plans/dnf4/main.fmf b/plans/dnf4/main.fmf new file mode 100644 index 000000000..18ae26b03 --- /dev/null +++ b/plans/dnf4/main.fmf @@ -0,0 +1,36 @@ +summary: Prepare CI DNF Stack + +tag: integration + +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 dnf4 branch + how: shell + script: + - git checkout dnf-4-stack + + - name: Checkout PR branch if packit call is from ci-dnf-stack + how: shell + script: | + if [ "$PACKIT_UPSTREAM_NAME" == "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 + git -C $TMT_PLANS_DATA/ci-dnf-stack rebase $PACKIT_TARGET_BRANCH + fi + + - name: Build testing container + how: shell + script: | + $TMT_PLANS_DATA/ci-dnf-stack/container-test build \ + --base $( echo "$@distro" | tr '-' ':') \ + --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \ + --container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS" diff --git a/plans/integration/behave-createrepo_c.fmf b/plans/dnf5/integration/behave-createrepo_c.fmf similarity index 100% rename from plans/integration/behave-createrepo_c.fmf rename to plans/dnf5/integration/behave-createrepo_c.fmf diff --git a/plans/integration/behave-dnf5.fmf b/plans/dnf5/integration/behave-dnf5.fmf similarity index 100% rename from plans/integration/behave-dnf5.fmf rename to plans/dnf5/integration/behave-dnf5.fmf diff --git a/plans/integration/behave-dnf5daemon.fmf b/plans/dnf5/integration/behave-dnf5daemon.fmf similarity index 100% rename from plans/integration/behave-dnf5daemon.fmf rename to plans/dnf5/integration/behave-dnf5daemon.fmf diff --git a/plans/dnf5/main.fmf b/plans/dnf5/main.fmf new file mode 100644 index 000000000..24071e852 --- /dev/null +++ b/plans/dnf5/main.fmf @@ -0,0 +1,31 @@ +summary: Prepare CI DNF Stack + +tag: integration + +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" == "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 + git -C $TMT_PLANS_DATA/ci-dnf-stack rebase $PACKIT_TARGET_BRANCH + fi + + - name: Build testing container + how: shell + script: | + $TMT_PLANS_DATA/ci-dnf-stack/container-test build \ + --base $( echo "$@distro" | tr '-' ':') \ + --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \ + --container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS" diff --git a/plans/main.fmf b/plans/main.fmf index 24071e852..faf719def 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -1,31 +1,8 @@ -summary: Prepare CI DNF Stack +summary: Prepare Tests -tag: integration +tag: all 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" == "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 - git -C $TMT_PLANS_DATA/ci-dnf-stack rebase $PACKIT_TARGET_BRANCH - fi - - - name: Build testing container - how: shell - script: | - $TMT_PLANS_DATA/ci-dnf-stack/container-test build \ - --base $( echo "$@distro" | tr '-' ':') \ - --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \ - --container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS"