In this post, we introduce the PSCodeHealth extension for Visual Studio Team Services. We look at how to use it to assess the quality of PowerShell code and to define and enforce quality gates in VSTS build definitions.
In this post, we take a look at leveraging Azure Automation and Azure Event Grid to ensure that deleting a VM from Azure will automatically trigger the removal of the corresponding machine from Octopus Deploy.
Pester, the awesome PowerShell testing framework has recently introduced a capability which allows us to extend our test assertions. This allows to simplify our tests by abstracting custom or complex assertion logic away from the tests and into separate scripts or modules.
In this post, we’ll look at PSCodeHealth’s default code quality metrics rules and how to customize them to our requirements. Then, we’ll use custom metrics rules in a release pipeline to decide if the build should pass or fail.
In this article, we are going to start with what we mean by ‘code quality’ and why it matters. Then, we’ll see how PSCodeHealth can help assess the quality and maintainability of a PowerShell project.
The output HTML of Jekyll-based sites may contain quite a lot a whitespace. This is especially noticeable with pages relying heavily on Liquid tags with conditional logic or looping.
Why does code complexity matter ? As Administrators or engineers, we deal with complexity all the time. We build, document, support and deploy complex systems on a pretty-much-daily basis. The expertise required to work with these systems is part of what makes us valuable. So why should we st...
When unit testing with Pester, mocking is pretty much unavoidable, especially for code related to infrastructure, configuration, or deployment. We don’t want our unit tests to touch files, databases, the registry, and not to mention the internet, do we ?
As you probably already know, when writing a DSC configuration, separating the environmental data from the configuration logic is a best practice. So all the environment-specific data gets stored in separate (typically .psd1) files. If you work with PowerShell DSC at medium-to-large scale, you (ho...
As you already know if you have read this or this, I’m a big fan of PSScriptAnalyzer to maintain a certain coding standard. This is especially powerful inside a release pipeline because this allows us to enforce that coding standard.