# auto generated by script/update-tasks.sh
# DO NOT EDIT: use the script instead
# source: https://raw.githubusercontent.com/openshift/pipelines-catalog/v0.14.3/task/s2i-dotnet-3/0.1/s2i-dotnet-3.yaml
#
---
apiVersion: tekton.dev/v1beta1
kind: ClusterTask
metadata:
  name: s2i-dotnet-3-v0-14-3
  labels:
    app.kubernetes.io/version: "0.1"
  annotations:
    tekton.dev/pipelines.minVersion: "0.11.3"
    tekton.dev/tags: s2i, dotnet, workspace
    tekton.dev/displayName: "s2i dotnet 3"
spec:
  description: >-
    s2i-dotnet-3 task fetches a Git repository and builds and
    pushes a container image using S2I and a .NET Core 3 builder image.

  params:
    - name: MINOR_VERSION
      description: The minor version of the .NET Core 3
      default: '1'
      type: string
    - name: PATH_CONTEXT
      description: The location of the path to run s2i from.
      default: .
      type: string
    - name: TLSVERIFY
      description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry)
      default: "true"
      type: string
    - name: IMAGE
      description: Location of the repo where image has to be pushed
      type: string
  workspaces:
    - name: source
      mountPath: /workspace/source
  steps:
    - name: generate
      image: registry.redhat.io/ocp-tools-43-tech-preview/source-to-image-rhel8
      workingDir: $(workspaces.source.path)
      command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/dotnet:3.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen']
      volumeMounts:
        - name: gen-source
          mountPath: /gen-source
    - name: build
      image: registry.redhat.io/rhel8/buildah
      workingDir: /gen-source
      command: ['buildah', 'bud', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.']
      volumeMounts:
        - name: varlibcontainers
          mountPath: /var/lib/containers
        - name: gen-source
          mountPath: /gen-source
      securityContext:
        privileged: true
    - name: push
      image: registry.redhat.io/rhel8/buildah
      command: ['buildah', 'push', '--tls-verify=$(params.TLSVERIFY)', '$(params.IMAGE)', 'docker://$(params.IMAGE)']
      volumeMounts:
        - name: varlibcontainers
          mountPath: /var/lib/containers
      securityContext:
        privileged: true
  volumes:
    - name: varlibcontainers
      emptyDir: {}
    - name: gen-source
      emptyDir: {}
