Update CI pipeline post v0.1.0 (#33)

This commit is contained in:
Bernie White 2020-01-05 20:03:24 +10:00 коммит произвёл GitHub
Родитель a3aa25237b
Коммит b69e432ce9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 25 добавлений и 27 удалений

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

@ -2,11 +2,11 @@
# CI pipeline for PSRule.Rules.Kubernetes # CI pipeline for PSRule.Rules.Kubernetes
variables: variables:
version: '0.1.0' version: '0.2.0'
buildConfiguration: 'Release' buildConfiguration: 'Release'
disable.coverage.autogenerate: 'true' 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) name: $(version)-B$(date:yyMM)$(rev:rrr)
trigger: trigger:
@ -70,17 +70,17 @@ stages:
condition: succeededOrFailed() condition: succeededOrFailed()
# PSRule results # PSRule results
# - task: PublishTestResults@2 - task: PublishTestResults@2
# displayName: 'Publish PSRule results' displayName: 'Publish PSRule results'
# inputs: inputs:
# testRunTitle: 'PSRule on $(imageName)' testRunTitle: 'PSRule on $(imageName)'
# testRunner: NUnit testRunner: NUnit
# testResultsFiles: 'reports/rule.report.xml' testResultsFiles: 'reports/ps-rule*.xml'
# mergeTestResults: true mergeTestResults: true
# platform: $(imageName) platform: $(imageName)
# configuration: $(buildConfiguration) configuration: $(buildConfiguration)
# publishRunAttachments: true publishRunAttachments: true
# condition: succeededOrFailed() condition: succeededOrFailed()
# Generate Code Coverage report # Generate Code Coverage report
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4 - task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4

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

@ -3,9 +3,7 @@
# #
[CmdletBinding()] [CmdletBinding()]
param ( param ()
)
# Setup error handling # Setup error handling
$ErrorActionPreference = 'Stop'; $ErrorActionPreference = 'Stop';
@ -38,18 +36,18 @@ Describe 'PSRule.Rules.Kubernetes' -Tag 'PowerShellGallery' {
} }
} }
Context 'Static analysis' { # Context 'Static analysis' {
$result = Invoke-ScriptAnalyzer -Path $modulePath; # $result = Invoke-ScriptAnalyzer -Path $modulePath;
$warningCount = ($result | Where-Object { $_.Severity -eq 'Warning' } | Measure-Object).Count; # $warningCount = ($result | Where-Object { $_.Severity -eq 'Warning' } | Measure-Object).Count;
$errorCount = ($result | Where-Object { $_.Severity -eq 'Error' } | Measure-Object).Count; # $errorCount = ($result | Where-Object { $_.Severity -eq 'Error' } | Measure-Object).Count;
if ($warningCount -gt 0) { # if ($warningCount -gt 0) {
Write-Warning -Message "PSScriptAnalyzer reports $warningCount warnings."; # Write-Warning -Message "PSScriptAnalyzer reports $warningCount warnings.";
} # }
It 'Has no quality errors' { # It 'Has no quality errors' {
$errorCount | Should -BeLessOrEqual 0; # $errorCount | Should -BeLessOrEqual 0;
} # }
} # }
} }