apiVersion: v1
kind: BuildConfig
metadata:
  name: mdapi-build
  labels:
    environment: "mdapi"
spec:
  source:
    git:
      uri: https://pagure.io/mdapi.git
{% if env == 'staging' %}
      ref: "master"
{% else %}
      ref: "production"
{% endif %}
  strategy:
    type: Docker
  triggers:
  - type: ConfigChange
  - type: ImageChange
  output:
    to:
      kind: ImageStreamTag
      name: mdapi:latest
