-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>
- Loading branch information
1 parent
b5092df
commit 178bb85
Showing
4 changed files
with
164 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |