ansible/roles/openshift-apps/poddlers/templates/buildconfig.yml.j2
Ryan Lerch ddc252d630 poddlers - rename templates to .j2
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 08:37:30 +10:00

63 lines
1.4 KiB
Django/Jinja

{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
---
# Build a derivative of the python-311 builder image with dependencies added
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: python-311-with-deps
labels:
app: poddlers
build: python-311-with-deps
spec:
runPolicy: Serial
source:
type: Dockerfile
dockerfile: |-
{{ load_file('Dockerfile-builder-image') | indent(6) }}
strategy:
type: Docker
dockerStrategy:
from:
kind: ImageStreamTag
# Use our own Fedora-based ImageStream
name: python-311:latest
output:
to:
kind: ImageStreamTag
name: python-311-with-deps:latest
triggers:
- type: ConfigChange
- type: ImageChange
---
# Build Toddlers
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: toddlers
labels:
app: poddlers
spec:
source:
type: Git
git:
uri: https://pagure.io/fedora-infra/toddlers.git
{% if env == 'staging' %}
ref: "staging"
{% else %}
ref: "production"
{% endif %}
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
# Our own ImageStream with deps added to it
name: python-311-with-deps:latest
output:
to:
kind: ImageStreamTag
name: toddlers:latest
triggers:
- type: ConfigChange
- type: ImageChange