Skip to content

ci: Add Bicep Parameter Validation Workflow and Script#499

Open
Harsh-Microsoft wants to merge 11 commits intodevfrom
hb-psl-38859
Open

ci: Add Bicep Parameter Validation Workflow and Script#499
Harsh-Microsoft wants to merge 11 commits intodevfrom
hb-psl-38859

Conversation

@Harsh-Microsoft
Copy link
Copy Markdown
Contributor

@Harsh-Microsoft Harsh-Microsoft commented Mar 31, 2026

Purpose

This pull request introduces a new GitHub Actions workflow to automate the validation of Bicep parameter files in the repository. The workflow is designed to run on a schedule, on pull requests affecting infrastructure files, or manually, and provides feedback through summary reports, artifact uploads, and optional email notifications.

The most important changes are:

Workflow Automation for Bicep Parameter Validation:

  • Added a new workflow file .github/workflows/validate-bicep-params.yml that validates all Bicep parameter files under the infra/ directory using a Python script, running on a schedule, on PRs to main and dev, or via manual dispatch.
  • The workflow summarizes validation results in the GitHub Actions summary and uploads detailed results as an artifact for further inspection.

Notification and Error Handling:

  • Implemented conditional steps to send email notifications (using a Logic App webhook) to the team if scheduled validation runs fail or succeed, providing detailed output and run URLs.
  • The workflow is configured to fail the job if parameter validation errors are detected, ensuring that issues are surfaced promptly.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces an automated CI workflow to validate that infra/**/*.parameters.json parameter names match their corresponding Bicep param declarations, with artifacts and scheduled email notifications to surface issues early.

Changes:

  • Added infra/scripts/validate_bicep_params.py to discover Bicep/parameter-file pairs and validate mapping/casing/whitespace and some conventions.
  • Added .github/workflows/validate-bicep-params.yml to run the validator on PRs, on a weekly schedule, and via manual dispatch; publish results and (on schedule) notify via Logic App.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
infra/scripts/validate_bicep_params.py New Python validator for Bicep ↔ parameters.json mapping checks, reporting, and JSON output for CI artifacts.
.github/workflows/validate-bicep-params.yml New GitHub Actions workflow to run the validator (standard + strict), upload artifacts, and send scheduled notifications.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Harsh-Microsoft Harsh-Microsoft requested a review from Copilot March 31, 2026 11:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Harsh-Microsoft and others added 3 commits April 1, 2026 10:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Harsh-Microsoft and others added 2 commits April 1, 2026 12:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants