# auto generated by script/update-tasks.sh
# DO NOT EDIT: use the script instead
# source: https://raw.githubusercontent.com/openshift/tektoncd-catalog/release-v0.8/s2i/s2i.yaml
#
---
apiVersion: tekton.dev/v1alpha1
kind: ClusterTask
metadata:
  name: s2i-v0-8-0
spec:
  inputs:
    params:
    - description: The location of the s2i builder image.
      name: BUILDER_IMAGE
    - default: .
      description: The location of the path to run s2i from.
      name: PATH_CONTEXT
    - default: 'true'
      description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS
        registry)
      name: TLSVERIFY
    - name: LOGLEVEL
      description: Log level when running the S2I binary
      default: '0'
    resources:
    - name: source
      type: git
  outputs:
    resources:
    - name: image
      type: image
  steps:
  - command:
    - /usr/local/bin/s2i
    - --loglevel=$(inputs.params.LOGLEVEL)
    - build
    - $(inputs.params.PATH_CONTEXT)
    - $(inputs.params.BUILDER_IMAGE)
    - --as-dockerfile
    - /gen-source/Dockerfile.gen
    image: quay.io/openshift-pipeline/s2i:nightly
    name: generate
    volumeMounts:
    - mountPath: /gen-source
      name: gen-source
    workingDir: /workspace/source
  - command:
    - buildah
    - bud
    - --tls-verify=$(inputs.params.TLSVERIFY)
    - --layers
    - -f
    - /gen-source/Dockerfile.gen
    - -t
    - $(outputs.resources.image.url)
    - .
    image: quay.io/buildah/stable
    name: build
    securityContext:
      privileged: true
    volumeMounts:
    - mountPath: /var/lib/containers
      name: varlibcontainers
    - mountPath: /gen-source
      name: gen-source
    workingDir: /gen-source
  - command:
    - buildah
    - push
    - --tls-verify=$(inputs.params.TLSVERIFY)
    - $(outputs.resources.image.url)
    - docker://$(outputs.resources.image.url)
    image: quay.io/buildah/stable
    name: push
    securityContext:
      privileged: true
    volumeMounts:
    - mountPath: /var/lib/containers
      name: varlibcontainers
  volumes:
  - emptyDir: {}
    name: varlibcontainers
  - emptyDir: {}
    name: gen-source
