You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I am new to Tekton.
Trying to run a Task within Windows Docker Desktop K8s I am facing the error:
"no such file or directory, open '/root/hello.txt'".
The Task is as follows:
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: hello
spec:
params:
- name: person
description: Name of person to greet
default: World
type: string
steps:
- name: write-hello
image: registry.access.redhat.com/ubi8/ubi
script: |
#!/usr/bin/env bash
echo Preparing greeting
echo Hello $(params.person) > ~/hello.txt
sleep 2
echo Done!
- name: say-hello
image: node:14
script: |
#!/usr/bin/env node
let fs = require("fs");
let file = "/root/hello.txt";
let fileContent = fs.readFileSync(file).toString();
console.log(fileContent);
It looks like there's no data persistency within Tasks running in Windows Docker Desktop K8s because the first step works with no issues.
Any clue on what's wrong?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
I am new to Tekton.
Trying to run a Task within Windows Docker Desktop K8s I am facing the error:
"no such file or directory, open '/root/hello.txt'".
The Task is as follows:
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: hello
spec:
params:
- name: person
description: Name of person to greet
default: World
type: string
steps:
- name: write-hello
image: registry.access.redhat.com/ubi8/ubi
script: |
#!/usr/bin/env bash
echo Preparing greeting
echo Hello $(params.person) > ~/hello.txt
sleep 2
echo Done!
- name: say-hello
image: node:14
script: |
#!/usr/bin/env node
let fs = require("fs");
let file = "/root/hello.txt";
let fileContent = fs.readFileSync(file).toString();
console.log(fileContent);
Beta Was this translation helpful? Give feedback.
All reactions