Files
fedora-infra_ansible/roles/openshift-apps/webhook2fedmsg/templates/buildconfig.yml.j2
Aurélien Bompard b754a19491 w2fm: let the build know about the environment
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-08-12 15:45:20 +02:00

37 lines
915 B
Django/Jinja

---
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: webhook2fedmsg
labels:
app: webhook2fedmsg
build: webhook2fedmsg
spec:
output:
to:
kind: ImageStreamTag
name: webhook2fedmsg:latest
source:
type: Git
git:
uri: https://github.com/fedora-infra/webhook-to-fedora-messaging.git
ref: "{{ env }}"
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
namespace: openshift
name: python:3.11-ubi9
env:
# The .s2i/bin/assemble script uses this to build the frontend with the
# correct API and Ipsilon addresses.
- name: FEDORA_ENV
value: "{{ env }}"
triggers:
- type: ConfigChange
- type: ImageChange
- type: GitHub
github:
secret: "{{ (env == 'staging')|ternary(webhook2fedmsg_stg_webhook_secret, webhook2fedmsg_prod_webhook_secret) }}"