Dinamic variables and envs
Hello, can I use dinamic variables and envs like this?
command:
kubectl get nodes:
exit-status: 0
stdout:
not:
match-regexp: 'NotReady'
export test="a":
exit-status: 0
http:
'{{.Env.test}}':
status: 200
timeout: 5000
Using a command output as a variable isn't supported currently. You would have to generate the vars.yaml file prior to running Goss.
This isn't a bad feature request, it's somewhat related to #784
If the vars.yaml supported a simple interface that ran a command to set the car to its stdout.. would that sufficiently solve #784 or does it add too much complexity?
Cc: @uk-bolly (meant to tag you on last comment)
thanks @aelsabbahy @legolego621
I like the idea and does cover off some of the idea of #784
However i would be using some some discovered variables multiple times, so it would require a running order, alternatively a wrapper script to set all the variables that could be inherited, if that would work? The simplicity of goss and modules would be lost somewhat with a wrapper script at that level.