Currently, running runtask outputs a lot of log information into stderr, along with the result YAML following this line.
runtask
[libtaskotron] 14:06:38 INFO Reporting to ResultsDB is disabled. Once enabled, the following would get reported:
It would be useful if there was an option to have only the result printed into stdout.
This is quite intentional. What exactly would printing the result yaml to stdout be good for? Not that I disagree, necessarily, but it sounds like an emerging hack :)
That's just a debug output. You already have the full resultyaml structure, because you need to feed it to resultsdb directive. So why don't just simply save it to a file if you need it? Our existing shell directive doesn't support feeding something to stdin at the moment, so the safest way right now (to avoid shell escaping issues) is to create save_results.sh that will safe the first argument received into a file of your choosing, and then call something like:
shell
save_results.sh
shell: - [ save_results.sh, '${resultsyaml}' ]
Of course you can also print it to stdout (just use cat or echo in the shell directive), but that doesn't sound like something that would help with reliable data processing (stdout can contain lots of other stuff).
cat
echo
Thank you for your hints, I misunderstood how the directives worked exactly! I now added a new directive that does what I need.
Metadata Update from @sanqui: - Issue close_status updated to: Invalid - Issue status updated to: Closed (was: Open)