From 83e34ad7b9da2a0581b7eb2b5e115d4f9ecefb18 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Sat, 13 Aug 2022 20:38:01 +0200 Subject: [PATCH] Add test of upgrades with podman. Unlike with docker, we have to "run" the container with podman to copy-up the content from the image to the volume, even if the run will fail, see https://github.com/containers/podman/issues/8041. --- .github/workflows/build-test.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 02a910b1..e312a349 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -193,6 +193,30 @@ jobs: - name: Run master and replica run: VOLUME=/tmp/freeipa-data replica=none tests/run-master-and-replica.sh localhost/freeipa-server:${{ matrix.os }} + test-upgrade-podman: + name: Upgrade from older version with podman + runs-on: ubuntu-22.04 + needs: [ build ] + strategy: + fail-fast: false + matrix: + include: + - os: fedora-36 + data-from: fedora-36 + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + with: + name: freeipa-server-${{ matrix.os }} + - name: Load image + run: gunzip < freeipa-server-${{ matrix.os }}.tar.gz | podman load + - name: Populate volume with data + run: podman volume create loaded-data && podman run --name loaded-data -v loaded-data:/data:z docker.io/freeipa/freeipa-server:data-${{ matrix.data-from }} noop || true + - name: Copy the content of the volume to directory + run: mkdir /tmp/freeipa-data && podman run --volumes-from loaded-data -v /tmp/freeipa-data:/data-out:z --rm docker.io/library/busybox sh -c 'cd /data && cp -a . /data-out' + - name: Run master and replica + run: docker=podman VOLUME=/tmp/freeipa-data replica=none tests/run-master-and-replica.sh localhost/freeipa-server:${{ matrix.os }} + test-upgrade-20-04: name: Upgrade from older version or build on Ubuntu 20.04 runs-on: ubuntu-20.04