-
Hi, I'm not sure if this is an issue or something I'm actually doing incorrectly. Locally the warnings are exhibited just fine but in Azure DevOps not. I tried using cli task and powershell task but I get the same result. Below is an image of when I build the template locally. Build on Azure DevOps: Also, I forced some errors in the template.bicep, they were captured but the task succeded : Build script
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I would not worry about build the file for validation, but rather just running validation and let the CLI transpile the bicep file for you steps:
- task: AzureCLI@2
displayName: 'Validate Bicep File"
inputs:
azureSubscription: '${{ parameters.azureServiceConnection }}'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az --version
az deployment sub validate \
--name 'Validation Deployment Name' \
--location '<location>' \
--template-file 'template.bicep' \
--parameters 'parameterfile.json' You can also run the same type of validation for group deployments as well My pipelines will have a build stage with a task to run validation. you could also run a |
Beta Was this translation helpful? Give feedback.
I would not worry about build the file for validation, but rather just running validation and let the CLI transpile the bicep file for you
You can also run the same type of validation for group deployments as well
it would also be good to hav…