-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add an additional argument to save the json to file #148
Comments
Is there a reason that adding |
Why do you need to parse the JSON? What are you trying to do that it is not supported by the CLI currently? |
This was my original plan but I happened to run with
It's just a pattern we tend to use. We use Jenkins libraries to create common building blocks for pipelines. For CLI tools this provides an abstraction for teams where instead of them having to deal with raw JSON from the library function, we instead return a Groovy object based on the JSON and relevant to our organisational usage. |
Perhaps this should be printed to |
In the mean time @j-puri, I suppose you could filter out that message before JSON parsing? |
Yes, the warning should be to stderr. That's a rookie error. If you can find where that's printed, it should be easy to fix. |
hmm actually it already is stderr. This means you should be able to split
|
Thanks for the help, all. It nearly works for me. I'm using the docker image to run the client which may be why I still get error logs in
When there's no errors, however, redirecting the output to a json file works as expected. |
That seems like a bug in the JSON output, or at least an inconsistency in how the |
Feature Request
An additional argument to save the json output to file. This would be particularly useful for
can-i-deploy
in CI so that the result json doesn't need to be extracted from parsed container logs (if using the Dockerised form of the CLI).The text was updated successfully, but these errors were encountered: