serverless / components

The Serverless Framework's new infrastructure provisioning technology — Build, compose, & deploy serverless apps in seconds...
https://www.serverless.com
Apache License 2.0
2.3k stars 181 forks source link

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

Open vicary opened 3 years ago

vicary commented 3 years ago

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.

nabi-chan commented 3 years ago

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

vicary commented 3 years ago

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.
nabi-chan commented 3 years ago

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

vicary commented 3 years ago

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.

nabi-chan commented 3 years ago

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

vicary commented 3 years ago

Glad to be of help!