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

New policy build workflow #1725

Merged
merged 17 commits into from
Aug 14, 2024
Merged

New policy build workflow #1725

merged 17 commits into from
Aug 14, 2024

Conversation

Springstone
Copy link
Member

@Springstone Springstone commented Aug 13, 2024

This pull request introduces several significant changes to the PowerShell scripts and GitHub workflows to improve policy management and testing. The key changes include the addition of new functions for JSON handling in PowerShell, new unit tests for policy builds, a new workflow for checking policy builds, and the removal of an outdated workflow.

New Functions for JSON Handling:

  • Added Remove-JSONMetadata function to remove metadata from JSON objects and handle nested templates. (.github/actions-pester/PolicyPesterTestHelper.psm1)
  • Added ConvertTo-OrderedHashtable function to convert JSON strings to ordered hashtables, ensuring consistent key order. (.github/actions-pester/PolicyPesterTestHelper.psm1)

New Unit Tests:

  • Introduced UnitTest-BuildPolicies to validate that policy, initiative, and role definition builds match the expected output. (.github/actions-pester/Test-BuildPolicies.Tests.ps1)

New Workflow for Policy Build Checks:

  • Added check-policy-build.yml workflow to automatically check policy builds on pull requests. (.github/workflows/check-policy-build.yml)

Removed Outdated Workflow:

  • Removed the update-portal.yml workflow, which was responsible for updating the portal experience on pull requests. (.github/workflows/update-portal.yml)

@Springstone Springstone requested a review from a team as a code owner August 13, 2024 15:13
@jtracey93
Copy link
Collaborator

jtracey93 commented Aug 14, 2024

AB#36739

.github/workflows/check-policy-build.yml Outdated Show resolved Hide resolved
.github/workflows/check-policy-build.yml Outdated Show resolved Hide resolved
docs/wiki/Whats-new.md Outdated Show resolved Hide resolved
jtracey93
jtracey93 previously approved these changes Aug 14, 2024
Copy link
Collaborator

@jtracey93 jtracey93 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@jtracey93 jtracey93 left a comment

Choose a reason for hiding this comment

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

LGTM

@jtracey93 jtracey93 merged commit 328b900 into Azure:main Aug 14, 2024
2 checks passed
@Springstone Springstone deleted the MSRCUpdate branch August 29, 2024 09:55
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