task-s5cmd-upload.yaml 970 Bytes
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: task-s5cmd-upload
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: upload-files
      image: $(params.s5cmd-image)
      command: ["/task-s5cmd-scripts/upload-files.sh"]
      args: ["$(params.items[*])"]
      env:
        - name: UPLOAD_INPUT
          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
---