Skip to content

Commit

Permalink
Add option to change the builder
Browse files Browse the repository at this point in the history
  • Loading branch information
inknos committed Feb 28, 2024
1 parent 1108192 commit 5f68c8c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 && \
Expand Down
5 changes: 5 additions & 0 deletions container-test
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
1 change: 1 addition & 0 deletions plans/dnf5/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 5f68c8c

Please sign in to comment.