From 5f68c8c15b896672cf0e42fa0b51f020d346eb35 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Wed, 28 Feb 2024 13:41:39 +0100 Subject: [PATCH] Add option to change the builder --- Dockerfile | 8 +++++--- container-test | 5 +++++ plans/dnf5/main.fmf | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e376b489f..acba5639c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ # $ podman build --build-arg TYPE=distro -t ci-dnf-stack -f Dockerfile # $ podman run --net none -it ci-dnf-stack behave dnf # -# Build for DNF4 -# $ podman build --build-arg DNF=dnf -t ci-dnf-stack -f Dockerfile +# To build for DNF5 be sure to use the dnf5 suite +# $ podman -s dnf5 build -t ci-dnf-stack -f Dockerfile # # Build for a specific Fedora version # $ podman build --build-arg BASE=fedora:38 -t ci-dnf-stack -f Dockerfile @@ -13,7 +13,9 @@ FROM $BASE ENV LANG C.UTF-8 ARG TYPE=nightly -ARG DNF + +ARG BUILD_WITH +ENV DNF=${BUILD_WITH:-dnf} # disable deltas and weak deps RUN set -x && \ diff --git a/container-test b/container-test index d8cbfbfd8..e89acb332 100755 --- a/container-test +++ b/container-test @@ -420,6 +420,11 @@ class BehaveRunner(object): if self.command_line_args.base is not None: command += ['--build-arg', 'BASE={}'.format(self.command_line_args.base)] + if self.command_line_args.suite == "dnf5": + command += ['--build-arg', 'BUILD_WITH=dnf5'] + else: + command += ['--build-arg', 'BUILD_WITH=dnf'] + command += ['-t', self.command_line_args.container] command += ['-f', self.command_line_args.docker_file, PROGPATH] diff --git a/plans/dnf5/main.fmf b/plans/dnf5/main.fmf index fb84bd52e..5bcdd5a22 100644 --- a/plans/dnf5/main.fmf +++ b/plans/dnf5/main.fmf @@ -5,6 +5,7 @@ prepare+: how: shell script: | $TMT_PLANS_DATA/ci-dnf-stack/container-test \ + --suite dnf5 \ -c dnf5-testing-container build \ --base $( echo "$@distro" | tr '-' ':') \ --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \