I'm getting this error for one of the tekton steps. How do I fix?
Error executing command: fork/exec /tekton/scripts/script-2-m6dkb: no such file or directory
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: build-images
spec:
params:
- name: person
description: Name of person to greet
default: John
type: string
steps:
- name: build
image: gcr.io/kaniko-project/executor:debug-v0.19.0
command:
- /busybox/sh
- -c
- echo test
- name: say-hello
image: gcr.io/kaniko-project/executor:debug-v0.19.0
command:
- /busybox/sh
args: ['-c', 'echo Hello $(params.person)']
- name: write-hello #Tekton thsi step fails! Error executing command: fork/exec /tekton/scripts/script-2-m6dkb: no such file or directory
image: registry.access.redhat.com/ubi8/ubi
script: |
#!/user/bin/env bash
echo Preparing greeting
echo Hello $(params.person) > ~/hello.txt
sleep 2
echo Done!
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: build-images
spec:
taskRef:
name: build-images
In the third container of your Task (write-hello), replace #!/user/bin/env bash
Should be: #!/usr/bin/env bash