Skip to content

Commit

Permalink
Add F40 to test matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>
  • Loading branch information
mattiaverga committed Feb 25, 2024
1 parent b5092df commit 178bb85
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
release: [f38,f39]
release: [f38,f39,f40]

build_in_koji:
name: Build ${{matrix.module}} on ${{matrix.release}} in Koji
Expand Down Expand Up @@ -74,4 +74,4 @@ jobs:
fail-fast: false
matrix:
module: [bodhi-client, bodhi-messages, bodhi-server]
release: [f38,f39]
release: [f38,f39,f40]
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
fail-fast: false
matrix:
# integration tests are broken on pip atm, so not included in this list.
release: [f38,f39,rawhide]
release: [f38,f39,f40,rawhide]

unit_tests:
name: Unit Tests
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
strategy:
fail-fast: false
matrix:
release: [f38,f39,pip,rawhide]
release: [f38,f39,f40,pip,rawhide]

rpms:
name: Build the RPMS
Expand All @@ -139,4 +139,4 @@ jobs:
strategy:
fail-fast: false
matrix:
release: [f38,f39,rawhide]
release: [f38,f39,f40,rawhide]
73 changes: 73 additions & 0 deletions devel/ci/Dockerfile-f40
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
FROM quay.io/fedora/fedora:40
LABEL maintainer="Mattia Verga <mattia.verga@fedoraproject.org>"

# RUN echo "fastestmirror=False" >> /etc/dnf/dnf.conf
# RUN echo "zchunk = False" >> /etc/dnf/dnf.conf

RUN dnf --best install -y \
createrepo_c \
fedora-messaging \
findutils \
git \
krb5-devel \
make \
pip \
poetry \
python-unversioned-command \
python3-alembic \
python3-arrow \
python3-authlib \
python3-backoff \
python3-bleach \
python3-bugzilla \
python3-celery \
python3-click \
python3-colander \
python3-cornice \
python3-createrepo_c \
python3-devel \
python3-diff-cover \
python3-dnf \
python3-dogpile-cache \
python3-feedgen \
python3-gssapi \
python3-jinja2 \
python3-koji \
python3-libcomps \
python3-librepo \
python3-markdown \
python3-munch \
python3-openid \
python3-psycopg2 \
python3-prometheus_client \
python3-pylibravatar \
python3-pymediawiki \
python3-pyramid \
python3-pyramid-fas-openid \
python3-pyramid-mako \
python3-pytest \
python3-pytest-cov \
python3-pytest-mock \
python3-requests-kerberos \
python3-responses \
python3-sphinx \
python3-sqlalchemy \
python3-sqlalchemy_schemadisplay \
python3-waitress \
python3-webtest \
python3-wheel \
python3-yaml \
python3-zstandard \
rpm-build \
rpmdevtools \
skopeo

VOLUME ["/results"]
WORKDIR /bodhi
CMD ["bash"]
COPY . /bodhi
ENV VIRTUAL_ENV=/srv/venv
RUN cp devel/development.ini.example bodhi-server/development.ini
RUN sed -i '/pyramid_debugtoolbar/d' bodhi-server/development.ini
RUN poetry config virtualenvs.create false
RUN git config --global --add safe.directory /bodhi
86 changes: 86 additions & 0 deletions devel/ci/integration/bodhi/Dockerfile-f40
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
FROM bodhi-ci/f40
LABEL \
name="bodhi-web" \
vendor="Fedora Infrastructure" \
maintainer="Aurelien Bompard <abompard@fedoraproject.org>" \
license="MIT"
ENV VIRTUAL_ENV=/srv/venv
# For integration testing we're using the infrastructure repo
RUN curl -o /etc/yum.repos.d/infra-tags.repo https://pagure.io/fedora-infra/ansible/raw/main/f/files/common/fedora-infra-tags.repo

# Install Bodhi deps (that were not needed by the unittests container)
RUN dnf install -y \
httpd \
intltool \
python3-mod_wsgi \
python3-pip \
skopeo \
rpm-build \
/usr/bin/koji

# Create bodhi user
RUN groupadd -r bodhi && \
useradd -r -s /sbin/nologin -d /home/bodhi/ -m -c 'Bodhi Server' -g bodhi bodhi
# setup rpmbuild
RUN mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
# Build the RPMs and Install them
RUN \
for pkg in bodhi-client bodhi-messages bodhi-server; do \
cd $pkg && \
poetry build -f sdist && \
cp dist/* ~/rpmbuild/SOURCES/ && \
cp $pkg.spec ~/rpmbuild/SPECS/ && \
rpmbuild -ba --nocheck ~/rpmbuild/SPECS/$pkg.spec && \
dnf install -y $(ls ~/rpmbuild/RPMS/noarch/*$pkg*.rpm) && \
cd ..; \
done; \
dnf install -y $(ls ~/rpmbuild/RPMS/noarch/*bodhi-composer*.rpm)

# Because we use self-signed certificates in integration tests
RUN dnf install -y python3-certifi

# Configuration
RUN mkdir -p /etc/bodhi
COPY devel/ci/integration/bodhi/production.ini /etc/bodhi/production.ini
COPY devel/ci/integration/bodhi/celeryconfig.py /etc/bodhi/celeryconfig.py
# Client authentication
RUN mkdir -p /home/bodhi/.config/bodhi/
COPY devel/ci/integration/bodhi/client.json /home/bodhi/.config/bodhi/
RUN chown bodhi:bodhi -R /home/bodhi/.config/

COPY devel/ci/integration/bodhi/start.sh /etc/bodhi/start.sh
COPY devel/ci/integration/bodhi/fedora-messaging.toml /etc/fedora-messaging/config.toml
COPY devel/ci/integration/bodhi/httpd.conf /etc/bodhi/httpd.conf
COPY bodhi-server/apache/bodhi.wsgi /etc/bodhi/bodhi.wsgi
RUN sed -i -e 's,/var/www,/httpdir,g' /etc/bodhi/bodhi.wsgi
COPY devel/ci/integration/bodhi/fedora-messaging.toml /etc/fedora-messaging/config.toml
# workaround for https://github.com/moby/moby/issues/37965
RUN true
# Composes
COPY devel/ci/integration/bodhi/pungi-call-dump.sh /etc/bodhi/pungi-call-dump.sh
COPY devel/ci/integration/bodhi/pungi.rpm.conf.j2 /etc/bodhi/pungi.rpm.conf.j2
COPY devel/ci/integration/bodhi/pungi.module.conf.j2 /etc/bodhi/pungi.module.conf.j2
COPY devel/ci/integration/bodhi/variants.rpm.xml.j2 /etc/bodhi/variants.rpm.xml.j2
COPY devel/ci/integration/bodhi/variants.module.xml.j2 /etc/bodhi/variants.module.xml.j2

RUN \
# Set up krb5
rm -f /etc/krb5.conf && \
ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \
ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi.fedoraproject.org.keytab

# Apache
RUN mkdir -p /httpdir && chown bodhi:bodhi /httpdir

# Tests tooling
COPY devel/ci/integration/bodhi/wait-for-file.py /usr/local/bin/wait-for-file
RUN chmod +x /usr/local/bin/wait-for-file
# Celery results
RUN mkdir -p /srv/celery-results && chown -R bodhi:bodhi /srv/celery-results
# Composes
RUN mkdir -p /srv/composes/final /srv/composes/stage && chown -R bodhi:bodhi /srv/composes

EXPOSE 8080
USER bodhi
ENV USER=bodhi
CMD ["bash", "/etc/bodhi/start.sh"]

0 comments on commit 178bb85

Please sign in to comment.