-
Notifications
You must be signed in to change notification settings - Fork 753
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
Bicep build --no-summary option not working #5828
Comments
I think that feature was removed in #3686 In the case of no errors it does not print any summary. It should likely be removed from the help text in https://github.com/Azure/bicep/blob/main/src/Bicep.Cli/Commands/RootCommand.cs. For the second question: The way the command is implemented it does throw an error code if the build fails and prints out the errors. You could do something like: $biceps = Get-ChildItem -Path . -Include "*.bicep" -r
$errors = 0
$numberOfFiles = $biceps.Length
foreach ($file in $biceps) {
$fileName = $file.Name
Write-Host "`n-------- Processing $fileName..."
bicep build $file.FullName
if ($LASTEXITCODE -ne 0) {
Write-Warning "Compiling $fileName failed"
$errors += 1
}
}
Write-Host "`n-------- Summary"
Write-Host "Number of files:`t $numberOfFiles"
Write-Host "Successful builds:`t $($numberOfFiles - $errors)"
Write-Host "Failed builds:`t`t $errors"
if ($errors -gt 0){
exit 1
} |
This seems like a great extension possibility for Devops. Thanks for the script! |
Bicep version
Describe the bug
no summary parameter unavailable.
On the flipside, is it possible to build the templates and provide just a text summary or Test Results compatible file for a DevOps build?
It would be useful to see a summary (similar to flake8 or pytest) on the console, and publish test results to a build.
No need to see the json detail in the build if performing verifications.
To Reproduce
The text was updated successfully, but these errors were encountered: