Skip to content
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

Show both progress and JSON output on deployment command #618

Closed
kalinchernev opened this issue Nov 20, 2019 · 4 comments
Closed

Show both progress and JSON output on deployment command #618

kalinchernev opened this issue Nov 20, 2019 · 4 comments

Comments

@kalinchernev
Copy link

- Do you want to request a feature or report a bug?

Feature

- What is the current behavior?

When running a deployment command with --json option in this way:

netlify deploy --site 1234-5678 --message "foo" --json

There is no progress displayed on the output, only the end result.

- What is the desired behavior?

Be able to have something as:

netlify deploy --site 1234-5678 --message "foo" --json --verbose

Which will show progress of the deployment and will print out the json in the end.

- What is goal of the feature?

After moving the build processes out of netlify platform to save from build minutes, a convenient way to take deployment status is marking the --json flag. This output can be directred to a .json file later feeded into another script to set preview status on github issues similarly to Netlify preview.

However, asking for the --json output, deployment process' progress cannot be seen any more.

Is there a way to achieve that without having a new feature? Checked this part of the code and can't quite imagine what options to pass.

@DavidWells
Copy link
Contributor

Hey @kalinchernev thanks for the request.

I'm not sure this would be possible. Mainly because all the stdout of the CLI would be parse of the response. This would effectively break the json if you are trying to parse it.

@kalinchernev
Copy link
Author

kalinchernev commented Nov 20, 2019 via email

@DavidWells
Copy link
Contributor

Yeah what you could do it:

netlify deploy # to see progress
# then
netlify api listDeploys --json ....other args

I'd recommend putting 2 commands together. We can't support terminal piping if we add non JSON output to the deployment command

@kalinchernev
Copy link
Author

Of course, that's what I meant, 2 commands. Managed to get deploys info with

netlify api listSiteDeploys --data '{ "site_id": "1234-5678"}' > deploys.json

From the deploys.json it's easy to find the necessary info.

Thanks for pointing out to the api command, didn't know about it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants