Skip to content

Deployment validate wrong exit code #10279

@Satak

Description

@Satak

CLI version
2.0.62 / latest

Describe the bug
When you run az group deployment validate command against your ARM templates in for example CircleCI the CLI tool returns exit code 0 though you encountered an error and your json error response is not null. Same behavior is for Windows.

To Reproduce
Validate any invalid arm template with the AZ CLI tool with command az group deployment validate --resource-group myRSGroup --template-file myTemplate.json --parameters @myTemplate.parameters.json and check the exit code. It's always 0 no matter if the template passed or not.

Expected behavior
Expected to have other than 0 exit code for non-valid templates so those can be captured in CI/CD pipelines.

Environment summary
Docker, Windows workstation

Metadata

Metadata

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-group

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions