components icon indicating copy to clipboard operation
components copied to clipboard

[feat] devOps friendly output format (JSON, YAML)

Open vicary opened this issue 4 years ago • 6 comments

Description

It should be a common use case to integrate Serverless Component into CI/CD pipelines, where outputs are usually parsed with scripts to further trigger other pipelines.

It would be really helpful if serverless deploy and serverless info allows an option for output formats, such as serverless deploy --format json.

This option should implies skipping the deploying TUI progress bar, which also solves #834.

vicary avatar May 09 '21 13:05 vicary

Hello, I am writing PR based on your Issue. What information should be printed out to be of great help?

nabi-chan avatar Jul 19 '21 07:07 nabi-chan

Thanks for making an effort. So in theory devOps pipelines should be programmatically friendly to parse, in general it should

  1. Remove CLI progress bar
  2. Show deployment outputs in JSON format, I am expecting the same data that can be referenced via the syntax ${output:...} in other components.

vicary avatar Jul 19 '21 12:07 vicary

Aha. So you want information like 'serverless info --debug' to be displayed in JSON or YAML format after the distribution pipeline is terminated?

nabi-chan avatar Jul 20 '21 02:07 nabi-chan

Yes. Such that I can easily plug my own scripts to grep necessary information into our own CI/CD pipelines. For example I can send the ARN downstream to another repo that updates our k8s proxy.

vicary avatar Jul 21 '21 07:07 vicary

Thanks for your help! Your answer is more help to this PR!

nabi-chan avatar Jul 21 '21 16:07 nabi-chan

Glad to be of help!

vicary avatar Jul 21 '21 20:07 vicary