Closed moritzheiber closed 4 years ago
Thanks @moritzheiber for looking into it. We know there is a gap with fetching output from tasks. One way to do is to assign value in bash (stdout), and then even pass them to oya render with --set parameter. We know it's not very convenient.
subTask: |
echo "Foo"
task: |
val=`oya run subTask`
echo "output from subtask"
echo $val
Thanks for your issue. We will think how to improve it
@moritzheiber I fixed @bart84ek's code (he's on vacation atm:).
To add to his point, you can also pass arguments to tasks so:
subTask: |
echo "Foo"
task: |
val=`oya run subTask`
echo "output from subtask"
oya run anotherTask $val
anotherTask: |
echo All arguments: $@
echo First argument: $1
I hope it's good enough for what you need.
I'd love to be able run a certain task and pass its output result (could be stdout or stderr) into a value/variable I can then use with another task, either as a regular environment variable or as a template value (i.e.
Oya[my_value]
).It would make it easier to orchestration depended workflows.