mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-30 10:42:37 +02:00
ci: Fix transient errors in Debian Bullseye
Fix transient errors in Debian Bullseye CI tests by using a different machine image (Ubuntu 22.04 vs Ubuntu 20.04), and solving some Podman config issues along the way. Fixes #388
This commit is contained in:
parent
641aa131c9
commit
14063349bb
1 changed files with 34 additions and 1 deletions
|
@ -299,12 +299,29 @@ jobs:
|
|||
./dev_scripts/env.py --distro debian --version bookworm run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
# NOTE: Making CI tests work in Debian Bullseye requires some tip-toeing
|
||||
# around certain Podman issues, as you'll see below. Read the following for
|
||||
# more details:
|
||||
#
|
||||
# https://github.com/freedomofpress/dangerzone/issues/388
|
||||
ci-debian-bullseye:
|
||||
machine:
|
||||
image: ubuntu-2004:202111-01
|
||||
image: ubuntu-2204:2023.04.2
|
||||
steps:
|
||||
- checkout
|
||||
- run: *install-podman
|
||||
- run:
|
||||
name: Configure Podman for Ubuntu 22.04
|
||||
command: |
|
||||
# This config circumvents the following issues:
|
||||
# * https://github.com/containers/podman/issues/6368
|
||||
# * https://github.com/containers/podman/issues/10987
|
||||
mkdir -p ~/.config/containers
|
||||
cat > ~/.config/containers/containers.conf \<<EOF
|
||||
[engine]
|
||||
cgroup_manager="cgroupfs"
|
||||
events_logger="file"
|
||||
EOF
|
||||
|
||||
- run:
|
||||
name: Prepare cache directory
|
||||
|
@ -319,6 +336,22 @@ jobs:
|
|||
command: |
|
||||
./dev_scripts/env.py --distro debian --version bullseye build-dev
|
||||
|
||||
- run:
|
||||
name: Configure Podman for Debian Bullseye
|
||||
command: |
|
||||
# Copy the Podman config into the container image we created for the
|
||||
# Dangerzone environment.
|
||||
cp ~/.config/containers/containers.conf containers.conf
|
||||
cat > Dockerfile.bullseye \<<EOF
|
||||
FROM dangerzone.rocks/build/debian:bullseye-backports
|
||||
RUN mkdir -p /home/user/.config/containers
|
||||
COPY containers.conf /home/user/.config/containers/
|
||||
EOF
|
||||
|
||||
# Create a new image from the Dangerzone environment and re-tag it.
|
||||
podman build -t dangerzone.rocks/build/debian:bullseye-backports \
|
||||
-f Dockerfile.bullseye .
|
||||
|
||||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
|
|
Loading…
Reference in a new issue