Validate infrastructure as code (IaC) and DevOps repositories using Azure Pipelines.
Перейти к файлу
dependabot[bot] 15b6ad77f1
Bump azure-pipelines-task-lib from 4.16.0 to 4.17.0 (#1056)
* Bump azure-pipelines-task-lib from 4.16.0 to 4.17.0

Bumps [azure-pipelines-task-lib](https://github.com/Microsoft/azure-pipelines-task-lib) from 4.16.0 to 4.17.0.
- [Commits](https://github.com/Microsoft/azure-pipelines-task-lib/commits)

---
updated-dependencies:
- dependency-name: azure-pipelines-task-lib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump change log

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bernie White <bewhite@microsoft.com>
2024-09-04 11:24:16 +10:00
.azure-pipelines Bump PowerShell dependencies (#922) 2023-12-02 17:39:32 +10:00
.github Bump actions/upload-artifact from 3 to 4 (#929) 2023-12-18 11:22:12 +10:00
.vscode Updates to CI process (#840) 2023-07-07 11:59:59 +10:00
docs Fix summary clean up (#725) 2023-03-05 15:48:07 +10:00
images Updates to tasks and icon #279 #278 #265 (#280) 2022-01-03 16:20:29 +10:00
scripts Update to build (#691) 2023-02-16 19:35:02 +10:00
tasks Fixes summary with job summary #750 (#751) 2023-03-29 22:44:54 +10:00
tests Added updates #353 #314 (#354) 2022-04-05 09:44:53 +10:00
.eslintignore Switch to eslint (#293) 2022-02-01 16:39:38 +10:00
.eslintrc.json Update config (#697) 2023-02-16 22:25:53 +10:00
.gitignore Add extension and CI pipeline (#1) 2020-04-05 17:19:45 +10:00
.markdownlint.json Update config (#697) 2023-02-16 22:25:53 +10:00
CHANGELOG.md Bump azure-pipelines-task-lib from 4.16.0 to 4.17.0 (#1056) 2024-09-04 11:24:16 +10:00
CODE_OF_CONDUCT.md Add extension and CI pipeline (#1) 2020-04-05 17:19:45 +10:00
CONTRIBUTING.md Add extension and CI pipeline (#1) 2020-04-05 17:19:45 +10:00
GitVersion.yml Update to build (#691) 2023-02-16 19:35:02 +10:00
LICENSE Add extension and CI pipeline (#1) 2020-04-05 17:19:45 +10:00
README.md Fix release (#696) 2023-02-16 22:11:26 +10:00
SECURITY.md Add extension and CI pipeline (#1) 2020-04-05 17:19:45 +10:00
SUPPORT.md Added SUPPORT.md (#152) 2021-05-01 23:34:39 +10:00
build.mjs Fix bundling (#719) 2023-03-04 18:25:59 +10:00
extension.config.js Update VstsTaskSdk (#961) 2024-03-06 23:24:10 +10:00
extension.md Update extension instructions (#605) 2022-11-19 17:19:06 +10:00
modules.json Update VstsTaskSdk (#961) 2024-03-06 23:24:10 +10:00
package-lock.json Bump azure-pipelines-task-lib from 4.16.0 to 4.17.0 (#1056) 2024-09-04 11:24:16 +10:00
package.json Bump azure-pipelines-task-lib from 4.16.0 to 4.17.0 (#1056) 2024-09-04 11:24:16 +10:00
pipeline.build.ps1 Fix task version numeric (#726) 2023-03-05 17:49:44 +10:00
ps-project.yaml Update ./modules.json (#944) 2024-01-27 22:16:56 +10:00
ps-rule.yaml Add repo dependency updates (#335) 2022-03-23 20:42:13 +10:00
tsconfig.json Update to build (#691) 2023-02-16 19:35:02 +10:00

README.md

PSRule extension for Azure Pipelines

An Azure DevOps extension for using PSRule within Azure Pipelines.

extension-version

Support

This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates.

  • For new issues, file your bug or feature request as a new issue.
  • For help, discussion, and support questions about using this project, join or start a discussion.

Support for this project/ product is limited to the resources listed above.

Getting started

The PSRule extension includes the following tasks for Azure Pipelines:

Name Friendly name Description Reference
ps-rule-assert PSRule analysis Run analysis with PSRule. reference
ps-rule-install Install PSRule module Install a PowerShell module containing rules. reference

To add these tasks, use the name for YAML pipelines or friendly name of classic pipelines.

Installing PSRule extension

To use PSRule within Azure DevOps Services, install the extension from the Visual Studio Marketplace. For detailed instructions see Install extensions.

If you don't have permissions to install extensions within your Azure DevOps organization, you can request it to be installed by an admin instead.

Using within YAML pipelines

To use these tasks within YAML pipelines:

  • Install rule modules with the ps-rule-install task (optional).
  • Run analysis one or more times with the ps-rule-assert task.
  • Publish analysis results with the Publish Test Results builtin task.

For example:

steps:

# Install PSRule.Rules.Azure from the PowerShell Gallery
- task: ps-rule-install@2
  inputs:
    module: PSRule.Rules.Azure   # Install PSRule.Rules.Azure from the PowerShell Gallery.

# Run analysis from JSON files using the `PSRule.Rules.Azure` module and custom rules from `.ps-rule/`.
- task: ps-rule-assert@2
  inputs:
    modules: 'PSRule.Rules.Azure'            # Analyze objects using the rules within the PSRule.Rules.Azure PowerShell module.
    outputFormat: NUnit3                     # Save results to an NUnit report.
    outputPath: reports/ps-rule-results.xml  # Write NUnit report to 'reports/ps-rule-results.xml'.

# Publish NUnit report as test results
- task: PublishTestResults@2
  displayName: 'Publish PSRule results'
  inputs:
    testRunTitle: 'PSRule'                          # The title to use for the test run.
    testRunner: NUnit                               # Import report using the NUnit format.
    testResultsFiles: 'reports/ps-rule-results.xml' # The previously saved NUnit report.

Changes and versioning

Extensions and tasks in this repository uses semantic versioning to declare breaking changes. For a list of module changes please see the change log.

Contributing

This project welcomes contributions and suggestions. If you are ready to contribute, please visit the contribution guide.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Maintainers

License

This project is licensed under the MIT License.