Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.99k forks source link

az bicep decompile: add exit code for warning errors #25009

Open juju4 opened 1 year ago

juju4 commented 1 year ago

Related command az bicep decompile

Is your feature request related to a problem? Please describe. Similar to https://github.com/PowerShell/PSScriptAnalyzer/issues/840 az bicep decompile seems to always return exit code 0 or at least for warnings there should be an option to detect warning so it can update status appropriately in azure-pipelines https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash

I'm using this command to validate my ARM templates as part of azure pipelines.

Describe the solution you'd like Either by default, either with an option, it should be possible an exit code that could match a pipeline status (success, warn, fail/error...)

Describe alternatives you've considered An alternative would be trapping command output and search for warning.

Additional context N/A

ghost commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

yonzhan commented 1 year ago

route to CXP team

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @josephkwchan, @jennyhunter-msft.

Issue Details
**Related command** az bicep decompile **Is your feature request related to a problem? Please describe.** Similar to https://github.com/PowerShell/PSScriptAnalyzer/issues/840 `az bicep decompile` seems to always return exit code 0 or at least for warnings there should be an option to detect warning so it can update status appropriately in azure-pipelines https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash I'm using this command to validate my ARM templates as part of azure pipelines. **Describe the solution you'd like** Either by default, either with an option, it should be possible an exit code that could match a pipeline status (success, warn, fail/error...) **Describe alternatives you've considered** An alternative would be trapping command output and search for warning. **Additional context** N/A
Author: juju4
Assignees: -
Labels: `Service Attention`, `ARM`, `customer-reported`
Milestone: -
navba-MSFT commented 1 year ago

Adding Service team, to look into this.

@josephkwchan, @jennyhunter-msft Could you please look into this once you get a chance ?

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @satyavel, @apclouds.

Issue Details
**Related command** az bicep decompile **Is your feature request related to a problem? Please describe.** Similar to https://github.com/PowerShell/PSScriptAnalyzer/issues/840 `az bicep decompile` seems to always return exit code 0 or at least for warnings there should be an option to detect warning so it can update status appropriately in azure-pipelines https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash I'm using this command to validate my ARM templates as part of azure pipelines. **Describe the solution you'd like** Either by default, either with an option, it should be possible an exit code that could match a pipeline status (success, warn, fail/error...) **Describe alternatives you've considered** An alternative would be trapping command output and search for warning. **Additional context** N/A
Author: juju4
Assignees: -
Labels: `Service Attention`, `ARM`, `ARM - Templates`, `customer-reported`
Milestone: -