ansible/roles/openshift-apps/maubot/templates/buildconfig.yml
Ryan Lerch 856284ac4a maubot: add some deps needed to build the image
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-05-02 13:14:30 +10:00

44 lines
1.6 KiB
YAML

{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
---
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: maubot-build
labels:
app: maubot
build: maubot
spec:
runPolicy: Serial
source:
dockerfile: |-
FROM fedora:40
RUN dnf -y install python3-pip python3-gssapi git libpq-devel gcc && dnf -y clean all
RUN pip install maubot[encryption] python-slugify httpx httpx_gssapi jinja2 fedora-messaging meetbot-messages pydantic maubot-fedora-messages backoff arrow python-gitlab
RUN \
curl https://raw.githubusercontent.com/fedora-infra/matrix-bots/main/install-plugins-from-git.py -o /usr/local/bin/install-maubot-plugins && \
chmod +x /usr/local/bin/install-maubot-plugins && \
mkdir /maubot && \
for plugin in maubot-fedora maubot-adminclient maubot-meetings maubot-webhook maubot-pagure-notifications maubot-gitlab; do \
install-maubot-plugins -o /maubot -b {{ (env == "production")|ternary("stable", "staging") }} https://github.com/fedora-infra/${plugin}; \
done;
WORKDIR /maubot
ENV KRB5_CONFIG=/etc/ipa/krb5.conf
ENTRYPOINT /usr/bin/python3 -m maubot -c /config/config.yml
type: Dockerfile
strategy:
type: Docker
dockerStrategy:
noCache: false
from:
kind: ImageStreamTag
name: fedora:40
output:
to:
kind: ImageStreamTag
name: maubot:latest
triggers:
- type: ConfigChange
- type: ImageChange
- type: Generic
generic:
secret: "{{ (env == 'production')|ternary(maubot_prod_github_secret, maubot_stg_github_secret) }}"