apiVersion: tekton.dev/v1
kind: Task
metadata:
  annotations:
    artifacthub.io/category: integration-delivery
    artifacthub.io/maintainers: |
      - name: OpenShift Pipeline task maintainers
        email: pipelines-extcomm@redhat.com
    artifacthub.io/provider: Red Hat
    artifacthub.io/recommendations: |
      - url: https://tekton.dev/
    operator.tekton.dev/last-applied-hash: bbefc0eb99b1f12b58ff46f80e75e316e71f12c10e4451a730b64fa0962deb11
    tekton.dev/categories: Git
    tekton.dev/displayName: git
    tekton.dev/pipelines.minVersion: 0.41.0
    tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64
    tekton.dev/source: https://github.com/openshift-pipelines/task-git
    tekton.dev/tags: git
  creationTimestamp: "2024-06-10T13:45:46Z"
  generation: 1
  labels:
    app.kubernetes.io/version: 0.3.0
    operator.tekton.dev/operand-name: openshift-pipelines-addons
    operator.tekton.dev/provider-type: redhat
  name: git-clone
  namespace: openshift-pipelines
  ownerReferences:
  - apiVersion: operator.tekton.dev/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: TektonInstallerSet
    name: addon-custom-resolvertask-4w7k4
    uid: 44cc2eb3-48d8-4e6c-82ef-203759a9a88b
  resourceVersion: "38833"
  uid: 74c87c87-2938-43e6-b183-6a2626bf8d16
spec:
  description: "This Task represents Git and is able to initialize and clone a remote
    repository on the informed Workspace. It's likely to become the first `step` on
    a Pipeline. \n"
  params:
  - default: ca-bundle.crt
    description: |
      Certificate Authority (CA) bundle filename on the `ssl-ca-directory`
      Workspace.
    name: CRT_FILENAME
    type: string
  - default: ""
    description: |
      HTTP proxy server (non-TLS requests).
    name: HTTP_PROXY
    type: string
  - default: ""
    description: |
      HTTPS proxy server (TLS requests).
    name: HTTPS_PROXY
    type: string
  - default: ""
    description: |
      Opt out of proxying HTTP/HTTPS requests.
    name: NO_PROXY
    type: string
  - default: ""
    description: |
      Relative path to the default Workspace where the git repository will be present.
    name: SUBDIRECTORY
    type: string
  - default: /home/git
    description: |
      Absolute path to the Git user home directory.
    name: USER_HOME
    type: string
  - default: "true"
    description: |
      Clean out the contents of the default Workspace before specific git operations occur, if data exists.
    name: DELETE_EXISTING
    type: string
  - default: "false"
    description: |
      Log the commands executed.
    name: VERBOSE
    type: string
  - default: "true"
    description: |
      Sets the global `http.sslVerify` value, `false` is not advised unless
      you trust the remote repository.
    name: SSL_VERIFY
    type: string
  - description: |
      Git repository URL.
    name: URL
    type: string
  - default: main
    description: |
      Revision to checkout, an branch, tag, sha, ref, etc...
    name: REVISION
    type: string
  - default: ""
    description: |
      Repository `refspec` to fetch before checking out the revision.
    name: REFSPEC
    type: string
  - default: "true"
    description: |
      Initialize and fetch Git submodules.
    name: SUBMODULES
    type: string
  - default: "1"
    description: |
      Number of commits to fetch, a "shallow clone" is a single commit.
    name: DEPTH
    type: string
  - default: ""
    description: |
      List of directory patterns split by comma to perform "sparse checkout".
    name: SPARSE_CHECKOUT_DIRECTORIES
    type: string
  results:
  - description: |
      The precise commit SHA digest cloned.
    name: COMMIT
    type: string
  - description: |
      The precise repository URL.
    name: URL
    type: string
  - description: |
      The epoch timestamp of the commit cloned.
    name: COMMITTER_DATE
    type: string
  stepTemplate:
    computeResources:
      limits:
        cpu: 100m
        memory: 256Mi
      requests:
        cpu: 100m
        memory: 256Mi
    env:
    - name: PARAMS_URL
      value: $(params.URL)
    - name: PARAMS_REVISION
      value: $(params.REVISION)
    - name: PARAMS_REFSPEC
      value: $(params.REFSPEC)
    - name: PARAMS_SUBMODULES
      value: $(params.SUBMODULES)
    - name: PARAMS_DEPTH
      value: $(params.DEPTH)
    - name: PARAMS_SPARSE_CHECKOUT_DIRECTORIES
      value: $(params.SPARSE_CHECKOUT_DIRECTORIES)
    - name: RESULTS_COMMITTER_DATE_PATH
      value: $(results.COMMITTER_DATE.path)
    - name: RESULTS_URL_PATH
      value: $(results.URL.path)
    - name: WORKSPACES_OUTPUT_PATH
      value: $(workspaces.output.path)
    - name: PARAMS_SSL_VERIFY
      value: $(params.SSL_VERIFY)
    - name: PARAMS_CRT_FILENAME
      value: $(params.CRT_FILENAME)
    - name: PARAMS_SUBDIRECTORY
      value: $(params.SUBDIRECTORY)
    - name: PARAMS_DELETE_EXISTING
      value: $(params.DELETE_EXISTING)
    - name: PARAMS_HTTP_PROXY
      value: $(params.HTTP_PROXY)
    - name: PARAMS_HTTPS_PROXY
      value: $(params.HTTPS_PROXY)
    - name: PARAMS_NO_PROXY
      value: $(params.NO_PROXY)
    - name: PARAMS_VERBOSE
      value: $(params.VERBOSE)
    - name: PARAMS_USER_HOME
      value: $(params.USER_HOME)
    - name: WORKSPACES_SSH_DIRECTORY_BOUND
      value: $(workspaces.ssh-directory.bound)
    - name: WORKSPACES_SSH_DIRECTORY_PATH
      value: $(workspaces.ssh-directory.path)
    - name: WORKSPACES_BASIC_AUTH_BOUND
      value: $(workspaces.basic-auth.bound)
    - name: WORKSPACES_BASIC_AUTH_PATH
      value: $(workspaces.basic-auth.path)
    - name: WORKSPACES_SSL_CA_DIRECTORY_BOUND
      value: $(workspaces.ssl-ca-directory.bound)
    - name: WORKSPACES_SSL_CA_DIRECTORY_PATH
      value: $(workspaces.ssl-ca-directory.path)
    - name: RESULTS_COMMIT_PATH
      value: $(results.commit.path)
    securityContext:
      runAsNonRoot: true
      runAsUser: 65532
  steps:
  - computeResources: {}
    image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14
    name: load-scripts
    script: |
      set -e
      printf '%s' "IyEvdXNyL2Jpbi9lbnYgc2gKCmV4cG9ydCBQQVJBTVNfVVJMPSIke1BBUkFNU19VUkw6LX0iCmV4cG9ydCBQQVJBTVNfUkVWSVNJT049IiR7UEFSQU1TX1JFVklTSU9OOi19IgpleHBvcnQgUEFSQU1TX1JFRlNQRUM9IiR7UEFSQU1TX1JFRlNQRUM6LX0iCmV4cG9ydCBQQVJBTVNfU1VCTU9EVUxFUz0iJHtQQVJBTVNfU1VCTU9EVUxFUzotf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TU1JVF9QQVRIfQoKcGhhc2UgIlJlcG9ydGluZyByZXBvc2l0b3J5IFVSTCAnJHtQQVJBTVNfVVJMfSciCnByaW50ZiAiJXMiICIke1BBUkFNU19VUkx9IiA+JHtSRVNVTFRTX1VSTF9QQVRIfQoKZXhpdCAw" |base64 -d >report.sh
      chmod +x *.sh
    volumeMounts:
    - mountPath: /scripts
      name: scripts-dir
    workingDir: /scripts
  - command:
    - /scripts/prepare.sh
    computeResources: {}
    image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14
    name: prepare
    volumeMounts:
    - mountPath: /scripts
      name: scripts-dir
    - mountPath: $(params.USER_HOME)
      name: user-home
    workingDir: $(workspaces.output.path)
  - command:
    - /scripts/git-run.sh
    computeResources: {}
    image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14
    name: git-run
    volumeMounts:
    - mountPath: /scripts
      name: scripts-dir
    - mountPath: $(params.USER_HOME)
      name: user-home
    workingDir: $(workspaces.output.path)
  - command:
    - /scripts/report.sh
    computeResources: {}
    image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14
    name: report
    volumeMounts:
    - mountPath: /scripts
      name: scripts-dir
  volumes:
  - emptyDir: {}
    name: user-home
  - emptyDir: {}
    name: scripts-dir
  workspaces:
  - description: |
      A `.ssh` directory with private key, `known_hosts`, `config`, etc.
      Copied to the Git user's home before cloning the repository, in order to
      server as authentication mechanismBinding a Secret to this Workspace is
      strongly recommended over other volume types.
    name: ssh-directory
    optional: true
  - description: |
      A Workspace containing a `.gitconfig` and `.git-credentials` files.
      These will be copied to the user's home before Git commands run. All
      other files in this Workspace are ignored. It is strongly recommended to
      use `ssh-directory` over `basic-auth` whenever possible, and to bind a
      Secret to this Workspace over other volume types.
    name: basic-auth
    optional: true
  - description: |
      A Workspace containing CA certificates, this will be used by Git to
      verify the peer with when interacting with remote repositories using
      HTTPS.
    name: ssl-ca-directory
    optional: true
  - description: |
      A workspace that contains the fetched git repository, data will be placed on the root of the
      Workspace, or on the relative path defined by the SUBDIRECTORY
      parameter.
    name: output
