forked from Azure/bicep-registry-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,325 changed files
with
82,041 additions
and
28,202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,6 @@ | |
## This composite action contains the logic to validate a module using a set of PSRule tests | ||
## | ||
######################################################### | ||
## | ||
##-------------------------------------------## | ||
## ACTION PARAMETERS ## | ||
##-------------------------------------------## | ||
## | ||
## |=================================================================================================================================================================| | ||
## | Parameter | Required | Default | Description | Example | | ||
## |--------------------------|----------|---------|--------------------------------------|--------------------------------------------------------------------------| | ||
## | templateFilePath | true | '' | The path to the module PSRule tests. | 'modules/api-management/service/.test/common/main.test.bicep' | | ||
## | subscriptionId | false | '' | The subscriptionId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | | ||
## | managementGroupId | false | '' | The managementGroupId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | | ||
## |=================================================================================================================================================================| | ||
## | ||
##---------------------------------------------## | ||
|
||
name: "Execute PSRule module tests" | ||
description: "Execute PSRule module tests (if any)" | ||
|
@@ -37,6 +23,14 @@ inputs: | |
psrulePath: | ||
description: "The path to PSRule configurations" | ||
required: false | ||
skipPassedRulesReport: | ||
description: "Show only failed rules in job summary" | ||
required: false | ||
default: $false | ||
psruleBaseline: | ||
description: "The PSRule baseline to be used" | ||
required: true | ||
default: "Azure.Default" | ||
|
||
runs: | ||
using: "composite" | ||
|
@@ -109,11 +103,27 @@ runs: | |
# [PSRule validation] task(s) | ||
#----------------------------- | ||
- name: Run PSRule analysis | ||
- name: Run PSRule analysis - All Pillars (Azure.Default) | ||
uses: microsoft/[email protected] | ||
if: ${{ inputs.psruleBaseline == 'Azure.Default' }} | ||
continue-on-error: true | ||
with: | ||
modules: "PSRule.Rules.Azure" | ||
baseline: "${{ inputs.psruleBaseline }}" | ||
inputPath: "${{ inputs.templateFilePath}}" | ||
outputFormat: Csv | ||
outputPath: "${{ inputs.templateFilePath}}-PSRule-output.csv" | ||
option: "${{ github.workspace }}/${{ inputs.psrulePath}}/ps-rule.yaml" # Path to PSRule configuration options file | ||
source: "${{ inputs.psrulePath}}/.ps-rule/" # Path to folder containing suppression rules to use for analysis. | ||
summary: false # Disabling as taken care in customized task | ||
|
||
- name: Run PSRule analysis - Reliability Pillar Only (Azure.Pillar.Reliability) | ||
uses: microsoft/[email protected] | ||
continue-on-error: true # Setting this whilst PSRule gets bedded in, in this project | ||
if: ${{ inputs.psruleBaseline == 'Azure.Pillar.Reliability' }} | ||
with: | ||
modules: "PSRule.Rules.Azure" | ||
prerelease: true | ||
baseline: "${{ inputs.psruleBaseline }}" | ||
inputPath: "${{ inputs.templateFilePath}}" | ||
outputFormat: Csv | ||
outputPath: "${{ inputs.templateFilePath}}-PSRule-output.csv" | ||
|
@@ -135,9 +145,9 @@ runs: | |
# Populate parameter input | ||
$ParameterInput = @{ | ||
inputFilePath = '${{ inputs.templateFilePath}}-PSRule-output.csv' | ||
outputFilePath = '${{ inputs.templateFilePath}}-PSRule-output.md' | ||
skipPassedRulesReport = $false | ||
inputFilePath = '${{ inputs.templateFilePath}}-PSRule-output.csv' | ||
outputFilePath = '${{ inputs.templateFilePath}}-PSRule-output.md' | ||
skipPassedRulesReport = ${{ inputs.skipPassedRulesReport}} | ||
} | ||
Write-Verbose ('Set PS Rule Output with following parameters:`n{0}' -f (ConvertTo-Json $ParameterInput -Depth 10)) -Verbose | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.