DEV Community

RoderickB
RoderickB

Posted on

1

PSRule module for Azure DevOps available for feedback

I have been a long time user of Azure DevOps and I have been using the Microsoft PSRule module for checking my Bicep templates for quite a while now. I like the flexible rule engine allowing to check for a wide range of issues. Now I have developed a PSRule module for checking Azure DevOps projects for common configuration issues. The module is available on GitHub and can be installed from the PowerShell Gallery.

PSRule run with PSRule.Rules.AzureDevOps module

Please note it is in early stage of development so I am very much looking forward to your feedback and contributions.

Using the module

To use this module, you need to have PSRule installed. You can install it from the PowerShell Gallery:

Install-Module -Name PSRule -Scope CurrentUser
Enter fullscreen mode Exit fullscreen mode

Once you have PSRule installed, you can install this module from the PowerShell Gallery:

Install-Module -Name PSRule.Rules.AzureDevOps -Scope CurrentUser
Enter fullscreen mode Exit fullscreen mode

Once you have both modules installed, you can run an export of your Azure DevOps project and run the rules against it. The -PAT value needs to be an Azure DevOps Personal Access Token with sufficient permissions to read the project data.

Export-AzDevOpsRuleData `
    -Organization "MyOrg" `
    -Project "MyProject" `
    -PAT $MyPAT `
    -OutputPath "C:\Temp\MyProject"
Assert-PSRule `
    -InputPath "C:\Temp\MyProject\" `
    -Module PSRule.Rules.AzureDevOps
Enter fullscreen mode Exit fullscreen mode

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️