chore: Bicep Parameter validation email format change#576
Open
NirajC-Microsoft wants to merge 2 commits intomicrosoft:devfrom
Open
chore: Bicep Parameter validation email format change#576NirajC-Microsoft wants to merge 2 commits intomicrosoft:devfrom
NirajC-Microsoft wants to merge 2 commits intomicrosoft:devfrom
Conversation
Comment on lines
+79
to
+84
| EMAIL_BODY=$(cat email_body.html) | ||
|
|
||
| jq -n \ | ||
| --arg name "${ACCELERATOR_NAME}" \ | ||
| --arg infra "$INFRA_OUTPUT" \ | ||
| --arg url "$RUN_URL" \ | ||
| '{subject: ("Bicep Parameter Validation Report - " + $name + " - Issues Detected"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has detected parameter mapping errors.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Please fix the parameter mapping issues at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>")}' \ | ||
| --arg body "$EMAIL_BODY" \ | ||
| '{subject: ("Bicep Parameter Validation Report - " + $name + " - Issues Detected"), body: $body}' \ |
Comment on lines
+95
to
+100
| EMAIL_BODY=$(cat email_body.html) | ||
|
|
||
| jq -n \ | ||
| --arg name "${ACCELERATOR_NAME}" \ | ||
| --arg infra "$INFRA_OUTPUT" \ | ||
| --arg url "$RUN_URL" \ | ||
| '{subject: ("Bicep Parameter Validation Report - " + $name + " - Passed"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has completed successfully. All parameter mappings are valid.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Best regards,<br>Your Automation Team</p>")}' \ | ||
| --arg body "$EMAIL_BODY" \ | ||
| '{subject: ("Bicep Parameter Validation Report - " + $name + " - Passed"), body: $body}' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request enhances the Bicep parameter validation workflow by introducing a structured HTML email report, improving the notification process, and adding new options to the validation script and workflow. The changes make the validation results easier to read and more professional, especially in automated emails sent to the team.
Key improvements include:
HTML Email Reporting
generate_html_reportfunction ininfra/scripts/validate_bicep_params.pyto create a detailed, well-formatted HTML report of validation results, including error/warning counts, per-file summaries, and workflow run links.--html-output,--accelerator-name, and--run-urlto support HTML report generation and customization.Workflow and Notification Updates
.github/workflows/validate-bicep-params.ymlto generate and archive the HTML report (email_body.html) as part of the validation job. [1] [2]Script Output Handling
validate_bicep_params.pyto write the HTML report when requested, ensuring the report is generated alongside the existing JSON output.Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information