apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
  name: compose-tracker-build
  labels:
    build: compose-tracker
spec:
  source:
    git:
{% if env == "staging" %}
      ref: staging
{% else %}
      ref: main
{% endif %}
      uri: https://pagure.io/releng/compose-tracker.git
    type: Git
  strategy:
    type: Docker
    dockerStrategy:
      from:
        kind: ImageStreamTag
        name: fedora:38
  output:
    to:
      kind: ImageStreamTag
      name: compose-tracker-img:latest
  triggers:
  - type: ConfigChange
{% if compose_tracker_webhook_secret is defined %}
  - type: Generic
    generic:
      secret: "{{ compose_tracker_webhook_secret }}"
{% endif %}
