apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
  name: pipeline0-task
spec:
  inputs:
    resources:
    - name: git-source
      type: git
    params:
    - name: pathToResourceFiles
      description: The path to the resource files to apply
      default: /workspace/git-source
    - name: apply-directory
      description: The directory from which resources are to be applied
      default: "."
    - name: target-namespace
      description: The namespace in which to create the resources being imported
      default: tekton-pipelines
  steps:
  - name: kubectl-apply
    image: lachlanevenson/k8s-kubectl
    command:
    - kubectl
    args:
    - apply
    - -f
    - ${inputs.params.pathToResourceFiles}/${inputs.params.apply-directory} 
    - -n
    - ${inputs.params.target-namespace}
