Update CI pipeline post v0.1.0 (#33)
This commit is contained in:
Родитель
a3aa25237b
Коммит
b69e432ce9
|
@ -2,11 +2,11 @@
|
|||
# CI pipeline for PSRule.Rules.Kubernetes
|
||||
|
||||
variables:
|
||||
version: '0.1.0'
|
||||
version: '0.2.0'
|
||||
buildConfiguration: 'Release'
|
||||
disable.coverage.autogenerate: 'true'
|
||||
|
||||
# Use build number format, i.e. 0.1.0-B1811001
|
||||
# Use build number format, i.e. 0.2.0-B1811001
|
||||
name: $(version)-B$(date:yyMM)$(rev:rrr)
|
||||
|
||||
trigger:
|
||||
|
@ -70,17 +70,17 @@ stages:
|
|||
condition: succeededOrFailed()
|
||||
|
||||
# PSRule results
|
||||
# - task: PublishTestResults@2
|
||||
# displayName: 'Publish PSRule results'
|
||||
# inputs:
|
||||
# testRunTitle: 'PSRule on $(imageName)'
|
||||
# testRunner: NUnit
|
||||
# testResultsFiles: 'reports/rule.report.xml'
|
||||
# mergeTestResults: true
|
||||
# platform: $(imageName)
|
||||
# configuration: $(buildConfiguration)
|
||||
# publishRunAttachments: true
|
||||
# condition: succeededOrFailed()
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish PSRule results'
|
||||
inputs:
|
||||
testRunTitle: 'PSRule on $(imageName)'
|
||||
testRunner: NUnit
|
||||
testResultsFiles: 'reports/ps-rule*.xml'
|
||||
mergeTestResults: true
|
||||
platform: $(imageName)
|
||||
configuration: $(buildConfiguration)
|
||||
publishRunAttachments: true
|
||||
condition: succeededOrFailed()
|
||||
|
||||
# Generate Code Coverage report
|
||||
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
#
|
||||
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
|
||||
)
|
||||
param ()
|
||||
|
||||
# Setup error handling
|
||||
$ErrorActionPreference = 'Stop';
|
||||
|
@ -38,18 +36,18 @@ Describe 'PSRule.Rules.Kubernetes' -Tag 'PowerShellGallery' {
|
|||
}
|
||||
}
|
||||
|
||||
Context 'Static analysis' {
|
||||
$result = Invoke-ScriptAnalyzer -Path $modulePath;
|
||||
# Context 'Static analysis' {
|
||||
# $result = Invoke-ScriptAnalyzer -Path $modulePath;
|
||||
|
||||
$warningCount = ($result | Where-Object { $_.Severity -eq 'Warning' } | Measure-Object).Count;
|
||||
$errorCount = ($result | Where-Object { $_.Severity -eq 'Error' } | Measure-Object).Count;
|
||||
# $warningCount = ($result | Where-Object { $_.Severity -eq 'Warning' } | Measure-Object).Count;
|
||||
# $errorCount = ($result | Where-Object { $_.Severity -eq 'Error' } | Measure-Object).Count;
|
||||
|
||||
if ($warningCount -gt 0) {
|
||||
Write-Warning -Message "PSScriptAnalyzer reports $warningCount warnings.";
|
||||
}
|
||||
# if ($warningCount -gt 0) {
|
||||
# Write-Warning -Message "PSScriptAnalyzer reports $warningCount warnings.";
|
||||
# }
|
||||
|
||||
It 'Has no quality errors' {
|
||||
$errorCount | Should -BeLessOrEqual 0;
|
||||
}
|
||||
}
|
||||
# It 'Has no quality errors' {
|
||||
# $errorCount | Should -BeLessOrEqual 0;
|
||||
# }
|
||||
# }
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче