-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/jq #2572
Feature/jq #2572
Conversation
trigger build |
This now instead fails in a lot of platforms with:
I suspect that this is the same underlying problem, but now failing in a more appropriate manner (not crashing): Using |
trigger build |
Gah! Now Windows... The compilation fight continues. |
Ok, I think Windows should be ok now, I moved most of the |
I think you can probably get started on the docs. It's only a matter of time before this goes in! :-) |
Alright, I still need to clean up the commit messages, but together with https://github.com/cfengine/enterprise/pull/308 this is green. Just awaiting docs. |
Great! I think we can't run it in the examples test, there's just too many strings to pull to make it available on every build slave. But if you've verified it locally, we can disable that part and it should be a good example nevertheless. |
OK, I changed the example (new commit ID is d51b0b9 ) so the output won't get tested ( |
docs in cfengine/documentation#1450 |
Squashed from: - jq integration for mapdata() - Close hanging file descriptors in ExecJSON_Pipe() - Use JsonDestroyMaybe() in FnCallMapData() - Accept multiple lines in ExecJSON_Pipe() - Add acceptance test for mapdata(json_pipe) Modified by: Kristian Amlie <kristian.amlie@cfengine.com> - Fix test by consuming input before outputting file. - Move Windows functions. - Fix log messages to no longer refer to package modules. - Move pipe functions to common file, since they are not UNIX specific. Changelog: Add `json_pipe` mode to `mapdata()`, which allows piping a JSON container to an external program for manipulation and receiving JSON back. The `jq` tool is a good example where this mode can be useful. A corresponding `$(def.jq)` variable has also been added with a default path to this tool. See documentation for `mapdata()` for more information and examples.
Alright, it's finally in! Thanks for the hard work! |
Oops, forgot example. Cherry-picked and pushed as well. |
woo hoo! |
Combination of #2319 and #2571, just for testing. Please review the mentioned PRs individually.