Skip to content

Commit

Permalink
container: add image for testing
Browse files Browse the repository at this point in the history
Add fedora-37 image for running pipelines
with pre-installed dependencies.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
  • Loading branch information
aesteve-rh committed Aug 30, 2022
1 parent 198c7df commit 2b6fee1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@ name: Pylint
on: [push, pull_request]

jobs:
build:
pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
container:
image: quay.io/alesgar/ovirt-stress-test-fedora-36
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install libcurl4-gnutls-dev librtmp-dev
python -m pip install --upgrade pip
pip install pylint
pip install ovirt-imageio
pip install ovirt-engine-sdk-python
- name: Analysing the code with pylint
run: |
git config --global --add safe.directory "$(pwd)"
pylint $(git ls-files '*.py')
14 changes: 14 additions & 0 deletions containers/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

targets := fedora-36

.PHONY: $(targets) push

all: $(targets)

$(targets):
podman build -t ovirt-stress-test-$@ -f $@.containerfile .

push:
for name in $(targets); do \
podman push ovirt-stress-test-$$name quay.io/alesgar/ovirt-stress-test-$$name; \
done
35 changes: 35 additions & 0 deletions containers/fedora-36.containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM registry.fedoraproject.org/fedora:36

# Runtime packages.
RUN echo v1 \
&& dnf install -y dnf-plugins-core \
&& dnf install -y \
createrepo_c \
e2fsprogs \
gcc \
git \
libcurl-devel \
libguestfs-tools-c \
libxml2-devel \
make \
openssl \
openssl-devel \
python3-devel \
python3-pip \
python3-setuptools \
python3-systemd \
qemu-img \
qemu-kvm \
rpm-build \
sudo \
systemd-udev \
util-linux \
xfsprogs \
&& depmod $(basename /lib/modules/*) \
&& dnf clean all

# Developemnt tools.
COPY requirements.txt requirements.txt
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install pylint \
&& python3 -m pip install --requirement requirements.txt
2 changes: 2 additions & 0 deletions containers/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ovirt-imageio
ovirt-engine-sdk-python

0 comments on commit 2b6fee1

Please sign in to comment.