forked from rpm-software-management/ci-dnf-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
257 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# Build | ||
# ----- | ||
# $ podman build --build-arg TYPE=local -t dnf-bot/ci-dnf-stack:centos7 -f Dockerfile.centos7 | ||
# | ||
# | ||
# Run | ||
# --- | ||
# $ podman run -it dnf-bot/ci-dnf-stack:centos7 behave -Ddnf_executable=dnf --junit --junit-directory=/opt/behave/junit/ [--wip --no-skipped] | ||
# | ||
# | ||
# Build types | ||
# ----------- | ||
# distro | ||
# install distro packages | ||
# copr | ||
# install distro packages | ||
# then upgrade to copr packages | ||
# local | ||
# install distro packages | ||
# then upgrade to copr packages | ||
# then install packages from local rpms/ folder | ||
# install also additional tools for debugging in the container | ||
|
||
|
||
FROM centos:7 | ||
ENV LANG C | ||
ARG TYPE=local | ||
|
||
|
||
# disable deltas and weak deps | ||
RUN set -x && \ | ||
echo -e "deltarpm=0" >> /etc/yum.conf && \ | ||
echo -e "install_weak_deps=0" >> /etc/yum.conf | ||
|
||
|
||
# install EPEL repo | ||
RUN set -x && \ | ||
rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm | ||
|
||
|
||
# if TYPE == copr or local, enable nightly copr | ||
RUN set -x && \ | ||
if [ "$TYPE" == "copr" -o "$TYPE" == "local" ]; then \ | ||
yum -y install yum-plugin-copr; \ | ||
yum -y copr enable rpmsoftwaremanagement/dnf-nightly; \ | ||
fi | ||
|
||
|
||
# upgrade all packages to the latest available versions | ||
RUN set -x && \ | ||
yum -y upgrade | ||
|
||
|
||
# remove yum-utils, they conflict with dnf-utils | ||
RUN set -x && \ | ||
yum -y remove yum-utils | ||
|
||
|
||
# install the test environment and additional packages | ||
RUN set -x && \ | ||
yum -y install \ | ||
# behave and test requirements | ||
# python2-behave - version >= 1.2.6 is not available as an RPM; install it from pip instead | ||
python2-pip \ | ||
pexpect \ | ||
# if TYPE == local, install debugging tools | ||
$(if [ "$TYPE" == "local" ]; then \ | ||
echo \ | ||
less \ | ||
openssh-clients \ | ||
procps-ng \ | ||
psmisc \ | ||
screen \ | ||
strace \ | ||
tcpdump \ | ||
vim-enhanced \ | ||
vim-minimal \ | ||
wget \ | ||
; \ | ||
fi) \ | ||
# install dnf stack | ||
createrepo_c \ | ||
dnf \ | ||
dnf-plugins-core \ | ||
# dnf-utils are disabled in the latest builds | ||
# dnf-utils \ | ||
libdnf \ | ||
microdnf && \ | ||
pip install 'behave >= 1.2.6' | ||
|
||
|
||
# if TYPE == local, install local RPMs | ||
COPY ./rpms/ /opt/behave/rpms/ | ||
RUN if [ "$TYPE" == "local" -a -n "$(find /opt/behave/rpms/ -maxdepth 1 -name '*.rpm' -print -quit)" ]; then \ | ||
dnf -y install /opt/behave/rpms/*.rpm \ | ||
-x '*-debuginfo' \ | ||
-x '*-debugsource' \ | ||
-x '*plugin-versionlock*' \ | ||
-x '*plugin-local*' \ | ||
-x '*plugin-torproxy*' \ | ||
-x '*plugin-migrate*' \ | ||
; \ | ||
fi | ||
|
||
|
||
# copy test suite | ||
COPY ./dnf-behave-tests/ /opt/behave/ | ||
|
||
|
||
VOLUME ["/opt/behave/junit"] | ||
WORKDIR /opt/behave |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Build | ||
# ----- | ||
# $ podman build --build-arg TYPE=local -t dnf-bot/ci-dnf-stack:f30 -f Dockerfile.f30 | ||
# | ||
# | ||
# Run | ||
# --- | ||
# $ podman run -it dnf-bot/ci-dnf-stack:f30 behave -Ddnf_executable=dnf --junit --junit-directory=/opt/behave/junit/ [--wip --no-skipped] | ||
# | ||
# | ||
# Build types | ||
# ----------- | ||
# distro | ||
# install distro packages | ||
# copr | ||
# install distro packages | ||
# then upgrade to copr packages | ||
# local | ||
# install distro packages | ||
# then upgrade to copr packages | ||
# then install packages from local rpms/ folder | ||
# install also additional tools for debugging in the container | ||
|
||
|
||
FROM fedora:30 | ||
ENV LANG C | ||
ARG TYPE=local | ||
|
||
|
||
|
||
# disable deltas and weak deps | ||
RUN set -x && \ | ||
echo -e "deltarpm=0" >> /etc/dnf/dnf.conf && \ | ||
echo -e "install_weak_deps=0" >> /etc/dnf/dnf.conf | ||
|
||
|
||
# if TYPE == copr or local, enable nightly copr | ||
RUN set -x && \ | ||
if [ "$TYPE" == "copr" -o "$TYPE" == "local" ]; then \ | ||
dnf -y install dnf-plugins-core; \ | ||
dnf -y copr enable rpmsoftwaremanagement/dnf-nightly; \ | ||
fi | ||
|
||
|
||
# upgrade all packages to the latest available versions | ||
RUN set -x && \ | ||
dnf -y --refresh upgrade | ||
|
||
|
||
# install the test environment and additional packages | ||
RUN set -x && \ | ||
dnf -y install \ | ||
# behave and test requirements | ||
findutils \ | ||
python3-behave \ | ||
python3-pexpect \ | ||
# if TYPE == local, install debugging tools | ||
$(if [ "$TYPE" == "local" ]; then \ | ||
echo \ | ||
less \ | ||
openssh-clients \ | ||
procps-ng \ | ||
psmisc \ | ||
screen \ | ||
strace \ | ||
tcpdump \ | ||
vim-enhanced \ | ||
vim-minimal \ | ||
wget \ | ||
; \ | ||
fi) \ | ||
# install dnf stack | ||
createrepo_c \ | ||
dnf \ | ||
dnf-plugins-core \ | ||
dnf-utils \ | ||
libdnf \ | ||
microdnf | ||
|
||
|
||
# if TYPE == local, install local RPMs | ||
COPY ./rpms/ /opt/behave/rpms/ | ||
RUN if [ "$TYPE" == "local" -a -n "$(find /opt/behave/rpms/ -maxdepth 1 -name '*.rpm' -print -quit)" ]; then \ | ||
dnf -y install /opt/behave/rpms/*.rpm \ | ||
-x '*-debuginfo' \ | ||
-x '*-debugsource' \ | ||
-x '*plugin-versionlock*' \ | ||
-x '*plugin-local*' \ | ||
-x '*plugin-torproxy*' \ | ||
-x '*plugin-migrate*' \ | ||
; \ | ||
fi | ||
|
||
|
||
# copy test suite | ||
COPY ./dnf-behave-tests/ /opt/behave/ | ||
|
||
|
||
VOLUME ["/opt/behave/junit"] | ||
WORKDIR /opt/behave |
This file was deleted.
Oops, something went wrong.
File renamed without changes.