task-s5cmd-download.yaml 979 Bytes
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: task-s5cmd-download
spec:
  params:
    - name: auth-config-map
      type: string
      default: foo
    - name: auth-secret
      type: string
      default: bar
    - name: items
      type: array
    - name: s5cmd-image
      type: string
      default: peakcom/s5cmd
  workspaces:
    - name: files
  volumes:
    - name: task-s5cmd-scripts
      configMap:
        name: task-s5cmd-scripts
        defaultMode: 0755

  steps:
    - name: download-files
      image: $(params.s5cmd-image)
      command: ["/task-s5cmd-scripts/download-files.sh"]
      args: ["$(params.items[*])"]
      env:
        - name: DOWNLOAD_OUTPUT
          value: $(workspaces.files.path)
      envFrom:
        - configMapRef:
            name: $(params.auth-config-map)
        - secretRef:
            name: $(params.auth-secret)
      volumeMounts:
        - name: task-s5cmd-scripts
          mountPath: /task-s5cmd-scripts
---