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

az deployment validate returns exit code 0 when an error is encountered in json #12031

Closed
chaos-panda opened this issue Feb 4, 2020 · 2 comments
Assignees
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group
Milestone

Comments

@chaos-panda
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

When you run az deployment validate command against your ARM templates locally or on a CI/CD returns exit code 0 even though you encountered an error and your json error response is not null.

Command Name
az deployment validate

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az deployment validate --location {} --subscription {} --template-file {} --parameters {} --parameters {} --parameters {}

Expected Behavior

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

Environment Summary

Linux-4.15.0-76-generic-x86_64-with-debian-buster-sid
Python 3.6.5
Shell: bash

azure-cli 2.0.81

Extensions:
aks-preview 0.4.11

Additional Context

@arrownj arrownj added the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label Feb 5, 2020
@triage-new-issues triage-new-issues bot removed the triage label Feb 5, 2020
@arrownj
Copy link
Contributor

arrownj commented Feb 5, 2020

Hi @zhoxing-ms , could you please help take a look at this ?

@yonzhan yonzhan added this to the S166 milestone Feb 5, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Feb 5, 2020

add to S166.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group
Projects
None yet
Development

No branches or pull requests

4 participants