Skip to content

Commit

Permalink
CI: Build custom Fedora image that has systemd installed
Browse files Browse the repository at this point in the history
With latest Fedora container images (starting from fedora:30) it seems
that the systemd script files have been removed. This patch builds a custom
fedora container image with systemd package installed, giving us the right
systemd-enabled environment to run PKI tests

Signed-off-by: Dinesh Prasanth M K <dmoluguw@redhat.com>
  • Loading branch information
SilleBille committed Jul 13, 2020
1 parent fed6047 commit 1f22eb6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/required-tests.yml
Expand Up @@ -108,8 +108,11 @@ jobs:
- name: Clone the repository
uses: actions/checkout@v2

- name: Build pki-test container image with systemd
run: docker build ci/ -t pki-fedora-${{ matrix.os }} --build-arg OS_VERSION=${{ matrix.os }}

- name: Setup required test environment
run: IMAGE=fedora:${{ matrix.os }} ci/runner-init.sh
run: IMAGE=pki-fedora-${{ matrix.os }} ci/runner-init.sh

- name: Download PKI binaries from Build job
uses: actions/download-artifact@v1
Expand Down Expand Up @@ -205,8 +208,11 @@ jobs:
- name: Clone the repository
uses: actions/checkout@v2

- name: Build pki-test container image with systemd
run: docker build ci/ -t pki-fedora-${{ matrix.os }} --build-arg OS_VERSION=${{ matrix.os }}

- name: Setup required test environment
run: IMAGE=fedora:${{ matrix.os }} ci/runner-init.sh
run: IMAGE=pki-fedora-${{ matrix.os }} ci/runner-init.sh

- name: Download PKI binaries from Build job
uses: actions/download-artifact@v1
Expand Down
8 changes: 8 additions & 0 deletions ci/Dockerfile
@@ -0,0 +1,8 @@
ARG OS_VERSION=latest
FROM fedora:$OS_VERSION

# Install systemd since pki runs as a systemd service
RUN true \
&& dnf update -y --refresh \
&& dnf install -y systemd \
&& true
3 changes: 2 additions & 1 deletion ci/runner-init.sh
Expand Up @@ -8,7 +8,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#

docker pull ${IMAGE}
# list the available images
docker images

docker run \
--detach \
Expand Down

0 comments on commit 1f22eb6

Please sign in to comment.