Updated PSRule dependency (#58)
This commit is contained in:
Родитель
5a907c0fea
Коммит
a0510bfd8e
|
@ -14,7 +14,7 @@ jobs:
|
|||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Run PSRule analysis
|
||||
uses: Microsoft/ps-rule@main
|
||||
uses: Microsoft/ps-rule@v1.12.0
|
||||
with:
|
||||
modules: 'PSRule.Rules.MSFT.OSS'
|
||||
prerelease: true
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
What's changed since v0.2.0:
|
||||
|
||||
- Engineering:
|
||||
- Bump PSRule dependency to v1.11.0. [#52](https://github.com/microsoft/PSRule.Rules.Kubernetes/issues/52)
|
||||
|
||||
## v0.2.0
|
||||
|
||||
What's changed since v0.1.0:
|
||||
|
|
|
@ -107,16 +107,13 @@ task VersionModule ModuleDependencies, {
|
|||
$manifest = Test-ModuleManifest -Path $manifestPath;
|
||||
$requiredModules = $manifest.RequiredModules | ForEach-Object -Process {
|
||||
if ($_.Name -eq 'PSRule' -and $Configuration -eq 'Release') {
|
||||
@{ ModuleName = 'PSRule'; ModuleVersion = '0.15.0' }
|
||||
@{ ModuleName = 'PSRule'; ModuleVersion = '1.11.0' }
|
||||
}
|
||||
else {
|
||||
@{ ModuleName = $_.Name; ModuleVersion = $_.Version }
|
||||
}
|
||||
};
|
||||
Update-ModuleManifest -Path $manifestPath -RequiredModules $requiredModules;
|
||||
$manifestContent = Get-Content -Path $manifestPath -Raw;
|
||||
$manifestContent = $manifestContent -replace 'PSRule = ''System.Collections.Hashtable''', 'PSRule = @{ Baseline = ''Kubernetes'' }';
|
||||
$manifestContent | Set-Content -Path $manifestPath;
|
||||
}
|
||||
|
||||
# Synopsis: Publish to PowerShell Gallery
|
||||
|
@ -157,8 +154,8 @@ task PSScriptAnalyzer NuGet, {
|
|||
|
||||
# Synopsis: Install PSRule
|
||||
task PSRule NuGet, {
|
||||
if ($Null -eq (Get-InstalledModule -Name PSRule -MinimumVersion '0.16.0-B2003027' -AllowPrerelease -ErrorAction Ignore)) {
|
||||
Install-Module -Name PSRule -MinimumVersion '0.16.0-B2003027' -AllowPrerelease -Scope CurrentUser -Force;
|
||||
if ($Null -eq (Get-InstalledModule -Name PSRule -MinimumVersion 1.11.0 -ErrorAction Ignore)) {
|
||||
Install-Module -Name PSRule -MinimumVersion 1.11.0 -Scope CurrentUser -Force;
|
||||
}
|
||||
Import-Module -Name PSRule -Verbose:$False;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ repository:
|
|||
url: https://github.com/Microsoft/PSRule.Rules.Kubernetes.git
|
||||
|
||||
modules:
|
||||
PSRule: 0.13.0
|
||||
PSRule: 1.11.0
|
||||
|
||||
tasks:
|
||||
build:
|
||||
|
|
|
@ -110,9 +110,6 @@ PrivateData = @{
|
|||
# ReleaseNotes of this module
|
||||
ReleaseNotes = 'https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/CHANGELOG.md'
|
||||
} # End of PSData hashtable
|
||||
PSRule = @{
|
||||
Baseline = 'Kubernetes'
|
||||
}
|
||||
} # End of PrivateData hashtable
|
||||
|
||||
# HelpInfo URI of this module
|
||||
|
|
|
@ -1,6 +1,27 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
---
|
||||
# Synopsis: A baseline for Kubernetes.
|
||||
apiVersion: github.com/microsoft/PSRule/v1
|
||||
kind: ModuleConfig
|
||||
metadata:
|
||||
name: PSRule.Rules.Kubernetes
|
||||
spec:
|
||||
binding:
|
||||
targetName:
|
||||
- metadata.name
|
||||
targetType:
|
||||
- kind
|
||||
field:
|
||||
namespace: [ 'metadata.namespace' ]
|
||||
useQualifiedName: true
|
||||
rule:
|
||||
baseline: Kubernetes
|
||||
|
||||
---
|
||||
# Synopsis: A baseline for Kubernetes.
|
||||
apiVersion: github.com/microsoft/PSRule/v1
|
||||
kind: Baseline
|
||||
metadata:
|
||||
name: Kubernetes
|
||||
|
@ -19,6 +40,7 @@ spec:
|
|||
|
||||
---
|
||||
# Synopsis: A baseline for Azure Kubernetes Service (AKS).
|
||||
apiVersion: github.com/microsoft/PSRule/v1
|
||||
kind: Baseline
|
||||
metadata:
|
||||
name: AKS
|
||||
|
|
Загрузка…
Ссылка в новой задаче