Skip to content

Commit

Permalink
ci: improve maintenance of test containers
Browse files Browse the repository at this point in the history
Consolidate list of package generation into test-packages.sh tool.

Add jq to all test containers.

Remove g++, less and quilt from Debian test container.
  • Loading branch information
Henrik66 committed Jul 16, 2023
1 parent 30a2f8c commit e17b60e
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 184 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
- { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
- { dockerfile: 'Dockerfile-Gentoo', tag: 'gentoo:latest' }
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
Expand Down
56 changes: 4 additions & 52 deletions test/container/Dockerfile-Arch
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,10 @@ RUN pacman --noconfirm -Syu base-devel git
RUN useradd -m build && echo "build ALL=(ALL) NOPASSWD: /usr/bin/pacman" > "/etc/sudoers.d/allow_pacman"
RUN su build -c 'cd && git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -s --noconfirm' && pacman -U --noconfirm ~build/paru-bin/*.pkg.tar.*

COPY tools/* /tmp/
WORKDIR /tmp

# Install needed packages for the dracut CI container
# Assume that initramfs virtual package is installed so that the default mkinitcpio package does not get installed
RUN su build -c 'paru --needed --noconfirm -Syu --assume-installed initramfs \
asciidoc \
astyle \
bash-completion \
biosdevname \
bluez \
btrfs-progs \
busybox \
bzip2 \
cifs-utils \
connman \
cpio \
cryptsetup \
dash \
dhclient \
dhcp \
dmraid \
e2fsprogs \
f2fs-tools \
fuse3 \
iproute \
iputils \
kbd \
linux \
lvm2 \
lzop \
mdadm \
memstrack \
multipath-tools \
nbd \
ndctl \
networkmanager \
nfs-utils \
ntfs-3g \
nvme-cli \
open-iscsi \
parted \
pcsclite \
pigz \
qemu \
rng-tools \
sbsigntools \
shellcheck \
shfmt \
squashfs-tools \
strace \
tar \
tcpdump \
tgt \
tpm2-tools \
vi \
which' \
RUN su build -c 'paru --needed --noconfirm -Syu --assume-installed initramfs `/tmp/test-packages.sh` ' \
&& yes | paru -Sccd
62 changes: 4 additions & 58 deletions test/container/Dockerfile-Debian
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,12 @@ FROM docker.io/debian:latest

MAINTAINER https://github.com/dracutdevs/dracut

COPY tools/* /tmp/
WORKDIR /tmp

# Install needed packages for the dracut CI container
# Install dracut as a linux-initramfs-tool provider so that the default initramfs-tool package does not get installed
# Uninstall initramfs-tools-core as a workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994492
RUN apt-get update -y -qq && apt-get upgrade -y -qq && apt-get install -y -qq --no-install-recommends dracut && \
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -o Dpkg::Use-Pty=0 \
asciidoc \
astyle \
btrfs-progs \
busybox-static \
bzip2 \
ca-certificates \
console-setup \
cpio \
cryptsetup \
curl \
dash \
debhelper \
debhelper-compat \
dmraid \
docbook \
docbook-xml \
docbook-xsl \
fdisk \
g++ \
gawk \
git \
iputils-arping \
iputils-ping \
isc-dhcp-client \
isc-dhcp-server \
kmod \
less \
libdmraid-dev \
libkmod-dev \
linux-image-generic \
lvm2 \
make \
mdadm \
multipath-tools \
nbd-client \
nbd-server \
network-manager \
nfs-kernel-server \
ntfs-3g \
open-iscsi \
ovmf \
parted \
pigz \
pkg-config \
procps \
qemu-system-x86 \
quilt \
shellcheck \
squashfs-tools \
strace \
sudo \
systemd-boot-efi \
tcpdump \
tgt \
thin-provisioning-tools \
vim \
wget \
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -o Dpkg::Use-Pty=0 $(/tmp/test-packages.sh) \
&& apt-get clean && dpkg -P --force-depends dracut dracut-core initramfs-tools-core
69 changes: 4 additions & 65 deletions test/container/Dockerfile-Fedora-latest
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,9 @@ FROM registry.fedoraproject.org/fedora:latest

MAINTAINER https://github.com/dracutdevs/dracut

COPY tools/* /tmp/
WORKDIR /tmp

# Install needed packages for the dracut CI container
RUN dnf -y install --setopt=install_weak_deps=False \
asciidoc \
bash-completion \
biosdevname \
bluez \
btrfs-progs \
busybox \
bzip2 \
cifs-utils \
cryptsetup \
dash \
dbus-daemon \
device-mapper-multipath \
dhcp-client \
dhcp-server \
dmraid \
e2fsprogs \
f2fs-tools \
fcoe-utils \
fuse3 \
gcc \
git \
iproute \
iputils \
iscsi-initiator-utils \
kbd \
kernel \
kmod-devel \
libkcapi-hmaccalc \
libselinux-utils \
lvm2 \
lzop \
make \
mdadm \
memstrack \
mksh \
nbd \
ndctl \
NetworkManager \
nfs-utils \
ntfs-3g \
ntfsprogs \
nvme-cli \
parted \
pcsc-lite \
pigz \
qemu-system-x86-core \
rng-tools \
rpm-build \
sbsigntools \
scsi-target-utils \
ShellCheck \
shfmt \
squashfs-tools \
strace \
sudo \
systemd-boot-unsigned \
systemd-networkd \
systemd-resolved \
tar \
tcpdump \
tpm2-tools \
wget \
which \
xz \
RUN dnf -y install --setopt=install_weak_deps=False $(/tmp/test-packages.sh) \
&& dnf -y remove dracut --noautoremove && dnf -y update && dnf clean all
11 changes: 4 additions & 7 deletions test/container/Dockerfile-OpenSuse-latest
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ FROM registry.opensuse.org/opensuse/tumbleweed-dnf:latest

MAINTAINER https://github.com/dracutdevs/dracut

COPY tools/* /tmp/
WORKDIR /tmp

# Install needed packages for the dracut CI container
RUN dnf -y install --setopt=install_weak_deps=False \
dash asciidoc mdadm lvm2 dmraid cryptsetup nfs-utils nbd dhcp-server \
strace libkmod-devel gcc bzip2 xz tar wget rpm-build make git bash-completion \
sudo kernel dhcp-client qemu-kvm /usr/bin/qemu-system-$(uname -m) e2fsprogs \
tcpdump iproute iputils kbd NetworkManager btrfsprogs tgt dbus-broker \
iscsiuio open-iscsi which ShellCheck shfmt procps pigz parted squashfs ntfsprogs \
multipath-tools util-linux-systemd systemd-boot \
RUN dnf -y install --setopt=install_weak_deps=False $(/tmp/test-packages.sh) \
&& dnf -y remove dracut && dnf -y update && dnf clean all
Loading

0 comments on commit e17b60e

Please sign in to comment.