apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: tkn-arg-test labels: app.kubernetes.io/version: "0.4" annotations: tekton.dev/pipelines.minVersion: "0.22.0" tekton.dev/tags: cli spec: description: >- Test consuming args params: - name: ARGS description: The terraform cli commands to tun type: array default: - "--help" - name: USER_HOME description: Override home directory to /tekton/home type: string default: "/tekton/home" steps: - name: echo-cli image: registry.access.redhat.com/ubi9/ubi-minimal:9.0.0-1580 workingDir: /tekton/home args: - "$(params.ARGS)" command: ["echo"] resources: limits: cpu: 250m memory: 1Gi requests: cpu: 250m memory: 500Mi env: - name: "HOME" value: $(params.USER_HOME) Use these tkn commands to initiate the task for testing. # Works tkn task start tkn-arg-test "-p=ARGS=init,two" --use-param-defaults --showlog # This fails when init is the first argument and there are two or more following arguments tkn task start tkn-arg-test "-p=ARGS=init,two,three" --use-param-defaults --showlog # These work as long as init is not the first command tkn task start tkn-arg-test "-p=ARGS=init1,two,three" --use-param-defaults --showlog tkn task start tkn-arg-test "-p=ARGS=two,init,three" --use-param-defaults --showlog