Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[osbuild-ci] Drop the python version of libdnf into /osb/libdnf-python-version (COMPOSER-2274) #79

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ target "virtual-osbuild-ci-cXs" {
]),
OSB_DNF_ALLOW_ERASING = 1,
}
dockerfile = "src/images/osbuild-ci-cstream.Dockerfile"
dockerfile = "src/images/osbuild-ci.Dockerfile"
inherits = [
"virtual-osbuild-ci-base",
]
Expand Down
63 changes: 0 additions & 63 deletions src/images/osbuild-ci-cstream.Dockerfile

This file was deleted.

17 changes: 16 additions & 1 deletion src/images/osbuild-ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
# Specify the package groups to install into the container. Separate
# groups by comma. By default, no group is pulled in.
#
# * OSB_PIP_PACKAGES=""
# Specify the packages to install into the container using pip. Separate
# packages by comma. By default, no packages are installed.
#

ARG OSB_FROM="docker.io/library/fedora:latest"
FROM "${OSB_FROM}" AS target
Expand All @@ -32,7 +36,10 @@ COPY src src

ARG OSB_DNF_PACKAGES=""
ARG OSB_DNF_GROUPS=""
RUN ./src/scripts/dnf.sh "${OSB_DNF_PACKAGES}" "${OSB_DNF_GROUPS}"
ARG OSB_PIP_PACKAGES=""
ARG OSB_DNF_ALLOW_ERASING=""
RUN ./src/scripts/dnf.sh "${OSB_DNF_PACKAGES}" "${OSB_DNF_GROUPS}" ${OSB_DNF_ALLOW_ERASING}
RUN ./src/scripts/pip.sh "${OSB_PIP_PACKAGES}"
COPY src/scripts/osbuild-ci.sh .

RUN rm -rf /osb/src
Expand All @@ -52,5 +59,13 @@ RUN git config --global --add safe.directory '*'
FROM scratch
COPY --from=target . .

#
# Drop the python version for which the python3-dnf package was installed.
# This is then used in osbuild tests to enable site-packages in the tox
# environment, when testing using the same python version.
#

RUN rpm -ql python3-dnf | grep -E '/usr/lib/python.*/site-packages/dnf/' | cut -d '/' -f 4 | uniq | sed -E 's/python([0-9])\.([0-9]+)/py\1\2/' | tee /osb/libdnf-python-version

WORKDIR /osb/workdir
ENTRYPOINT ["/osb/osbuild-ci.sh"]
Loading