kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
  name: "openscap-ocp4-ds" 
spec:
  lookupPolicy:
    local: true
---
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
  name: "openscap-ocp4-ds" 
spec:
  runPolicy: "Serial" 
  triggers: 
    -
      type: "ImageChange"
  source: 
    dockerfile: |
      FROM registry.fedoraproject.org/fedora-minimal:38 as builder

      WORKDIR /content

      COPY . .

      RUN microdnf -y install cmake make git /usr/bin/python3 python3-pyyaml python3-jinja2 openscap-utils

      RUN ./build_product --datastream-only --debug ocp4 rhcos4

      FROM registry.access.redhat.com/ubi8/ubi-minimal
      WORKDIR /
      COPY --from=builder /content/build/ssg-ocp4-ds.xml .
      COPY --from=builder /content/build/ssg-rhcos4-ds.xml .
  strategy: 
    dockerStrategy:
      noCache: true
  output: 
    to:
      kind: "ImageStreamTag"
      name: "openscap-ocp4-ds:latest"
