Create file using garden task
# 🌱|help-and-getting-started
Hi Team, Is it possible to create the file inside the pod using garden task? - name: tiger-mock-task cacheResult: false command: - /bin/sh - -c - echo "Hello,!" > __files/phUIWeb/authentication/file.txt dependencies: - tiger-mock timeout: 100 task executed successfully. but inside the pod i am not able to see that file.txt
Hi @chilly-beard-31233, when you run a task the way you configured it, Garden will spin up a new pod to execute said task from that pod. So the file probably got created but not on the pod you were expecting. What you could do is using a
action (I am assuming you are on 0.13.x):
Copy code
kind: Run
type: kubernetes-exec
name: tiger-mock-task
description: a description
dependencies: [deploy.tiger-mock]
    kind: Deployment
    name: tiger-mock # or your pod deployment
  command: ["echo", "'Hello,!' > __files/phUIWeb/authentication/file.txt"]
Here's some docs where you can find all the options:
let me go through it.. thanks for reference
Hi @chilly-beard-31233 did you make it work?