This commit is contained in:
Bernie White 2021-05-10 21:42:29 +10:00 коммит произвёл GitHub
Родитель 104338c10c
Коммит dd87e40bc7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 74 добавлений и 64 удалений

Просмотреть файл

@ -2,12 +2,12 @@
# CI pipeline for PSRule.Monitor
variables:
version: '0.2.0'
version: '0.3.0'
buildConfiguration: 'Release'
disable.coverage.autogenerate: 'true'
imageName: 'ubuntu-18.04'
# Use build number format, i.e. 0.2.0-B1811001
# Use build number format, i.e. 0.3.0-B1811001
name: $(version)-B$(date:yyMM)$(rev:rrr)
trigger:

28
.github/dependabot.yml поставляемый
Просмотреть файл

@ -1,15 +1,29 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
#
# Dependabot configuration
#
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
labels:
- "dependencies"
- 'ci-quality'
reviewers:
- "microsoft/psrule"
- 'microsoft/psrule'
# Maintain dependencies for NuGet
- package-ecosystem: 'nuget'
directory: '/'
schedule:
interval: 'daily'
labels:
- 'dependencies'
reviewers:
- 'microsoft/psrule'

3
.github/workflows/analyze.yaml поставляемый
Просмотреть файл

@ -15,3 +15,6 @@ jobs:
- name: Run PSRule analysis
uses: Microsoft/ps-rule@main
with:
modules: PSRule.Rules.MSFT.OSS
prerelease: true

Просмотреть файл

@ -4,15 +4,18 @@ Log PSRule analysis results to Azure Monitor.
![ci-badge]
## Disclaimer
## Support
This project is open source and **not a supported product**.
This project uses GitHub Issues to track bugs and feature requests.
Please search the existing issues before filing new issues to avoid duplicates.
If you are experiencing problems, have a feature request, or a question, please check for an [issue] on GitHub.
If you do not see your problem captured, please file a new issue, and follow the provided template.
- 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].
If you have any problems with the [PSRule][engine] engine, please check the project GitHub [issues](https://github.com/Microsoft/PSRule/issues) page instead.
Support for this project/ product is limited to the resources listed above.
## Getting the modules
This project requires the `PSRule` PowerShell module. For details on each see [install].
@ -104,3 +107,4 @@ This project is [licensed under the MIT License](LICENSE).
[module]: https://www.powershellgallery.com/packages/PSRule.Monitor
[engine]: https://github.com/Microsoft/PSRule
[issue]: https://github.com/Microsoft/PSRule.Monitor/issues
[discussion]: https://github.com/microsoft/PSRule.Monitor/discussions

16
SUPPORT.md Normal file
Просмотреть файл

@ -0,0 +1,16 @@
# Support
## How to file issues and get help
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].
## Microsoft Support Policy
Support for this project/ product is limited to the resources listed above.
[issue]: https://github.com/microsoft/PSRule.Monitor/issues
[discussion]: https://github.com/microsoft/PSRule.Monitor/discussions

Просмотреть файл

@ -84,44 +84,6 @@ function CopyModuleFiles {
}
}
function Get-RepoRuleData {
[CmdletBinding()]
param (
[Parameter(Position = 0, Mandatory = $False)]
[String]$Path = $PWD
)
process {
GetPathInfo -Path $Path -Verbose:$VerbosePreference;
}
}
function GetPathInfo {
[CmdletBinding()]
param (
[Parameter(Mandatory = $True)]
[String]$Path
)
begin {
$items = New-Object -TypeName System.Collections.ArrayList;
}
process {
$Null = $items.Add((Get-Item -Path $Path));
$files = @(Get-ChildItem -Path $Path -File -Recurse -Include *.ps1,*.psm1,*.psd1,*.cs | Where-Object {
!($_.FullName -like "*.Designer.cs") -and
!($_.FullName -like "*/bin/*") -and
!($_.FullName -like "*/obj/*") -and
!($_.FullName -like "*\obj\*") -and
!($_.FullName -like "*\bin\*") -and
!($_.FullName -like "*\out\*") -and
!($_.FullName -like "*/out/*")
});
$Null = $items.AddRange($files);
}
end {
$items;
}
}
task VersionModule ModuleDependencies, {
$modulePath = Join-Path -Path $ArtifactPath -ChildPath PSRule.Monitor;
$manifestPath = Join-Path -Path $modulePath -ChildPath PSRule.Monitor.psd1;
@ -180,10 +142,12 @@ task PSScriptAnalyzer NuGet, {
# Synopsis: Install PSRule
task PSRule NuGet, {
if ($Null -eq (Get-InstalledModule -Name PSRule -MinimumVersion 1.2.0 -ErrorAction Ignore)) {
Install-Module -Name PSRule -Repository PSGallery -MinimumVersion 1.2.0 -Scope CurrentUser -Force;
if ($Null -eq (Get-InstalledModule -Name PSRule -MinimumVersion 1.3.0 -ErrorAction Ignore)) {
Install-Module -Name PSRule -Repository PSGallery -MinimumVersion 1.3.0 -Scope CurrentUser -Force;
}
if ($Null -eq (Get-InstalledModule -Name PSRule.Rules.MSFT.OSS -MinimumVersion 0.1.0 -ErrorAction Ignore)) {
Install-Module -Name PSRule.Rules.MSFT.OSS -Repository PSGallery -MinimumVersion 0.1.0 -Scope CurrentUser -Force;
}
Import-Module -Name PSRule -Verbose:$False;
}
# Synopsis: Install PSDocs
@ -268,8 +232,11 @@ task Rules PSRule, {
Style = $AssertStyle
OutputFormat = 'NUnit3'
ErrorAction = 'Stop'
As = 'Summary'
Format = 'File'
InputPath = '.'
Module = @('PSRule.Rules.MSFT.OSS')
}
Get-RepoRuleData -Path $PWD |
Assert-PSRule @assertParams -OutputPath reports/ps-rule-file.xml;
}

Просмотреть файл

@ -1,5 +1,11 @@
# PSRule options for QA
binding:
targetName:
- FullName
input:
pathIgnore:
- '.vscode/'
- '*.md'
- '*.Designer.cs'
output:
culture:
- 'en'

Просмотреть файл

@ -18,7 +18,7 @@
<Copyright>Copyright (c) Microsoft Corporation. Licensed under the MIT License.</Copyright>
<Description>Log PSRule analysis results to Azure Monitor.
This project is open source and not a supported product.</Description>
This project uses GitHub Issues to track bugs and feature requests. See GitHub project for more information.</Description>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">

Просмотреть файл

@ -31,7 +31,7 @@ Copyright = '(c) Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Log PSRule analysis results to Azure Monitor.
This project is open source and not a supported product.'
This project uses GitHub Issues to track bugs and feature requests. See GitHub project for more information.'
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.1'