From 87165366b7a1301c4c0bf67f92e0edfe530c2336 Mon Sep 17 00:00:00 2001 From: Bernie White Date: Mon, 29 Jul 2019 00:17:15 +1000 Subject: [PATCH] Pre-release v0.3.0-B190723 (#106) --- .azure-pipelines/azure-pipelines.yaml | 26 ++++++++++++++++++++++---- CHANGELOG.md | 6 ++++++ pipeline.build.ps1 | 4 ++++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yaml b/.azure-pipelines/azure-pipelines.yaml index 3c915352e69..3b0a1bb1f76 100644 --- a/.azure-pipelines/azure-pipelines.yaml +++ b/.azure-pipelines/azure-pipelines.yaml @@ -31,16 +31,20 @@ stages: strategy: matrix: Linux: + displayName: 'Linux' imageName: 'ubuntu-16.04' MacOS: + displayName: 'MacOS' imageName: 'macos-10.13' Windows: + displayName: 'Windows' imageName: 'vs2017-win2016' publish: 'true' analysis: 'true' coverage: 'true' pool: vmImage: $(imageName) + displayName: 'PowerShell' steps: # Install pipeline dependencies @@ -77,12 +81,24 @@ stages: # publishRunAttachments: true # condition: succeededOrFailed() - # Publish Code Coverage Results + # Generate Code Coverage report + - task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4 + displayName: 'Code coverage report generator' + inputs: + reports: 'reports\pester-coverage.xml' + targetdir: 'reports\coverage' + sourcedirs: 'src\PSRule.Rules.Azure' + reporttypes: 'HtmlInline_AzurePipelines;Cobertura;Badges' + tag: $(Build.BuildNumber) + condition: eq(variables['coverage'], 'true') + + # Publish Code Coverage report - task: PublishCodeCoverageResults@1 displayName: 'Publish Pester code coverage' inputs: - codeCoverageTool: 'JaCoCo' - summaryFileLocation: 'reports/pester-coverage.xml' + codeCoverageTool: 'Cobertura' + summaryFileLocation: 'reports/coverage/Cobertura.xml' + reportDirectory: 'reports/coverage' condition: eq(variables['coverage'], 'true') # Generate artifacts @@ -103,6 +119,8 @@ stages: displayName: Live pool: vmImage: 'ubuntu-16.04' + variables: + isPreRelease: $[contains(variables['Build.SourceBranchName'], '-B')] steps: - task: DownloadPipelineArtifact@1 displayName: 'Download module' @@ -127,4 +145,4 @@ stages: releaseNotes: 'See [change log](https://github.com/BernieWhite/PSRule.Rules.Azure/blob/master/CHANGELOG.md)' assetUploadMode: replace addChangeLog: false - isPreRelease: $(contains(variables['Build.SourceBranchName'], '-B')) + isPreRelease: $(isPreRelease) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cb077ea888..cf41fb39ffe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## Unreleased +## v0.3.0-B190723 (pre-release) + - Excluded global services from Azure.Resource.AllowedRegions. [#96](https://github.com/BernieWhite/PSRule.Rules.Azure/issues/96) - Enforce minimum TLS version for App Service. [#99](https://github.com/BernieWhite/PSRule.Rules.Azure/issues/99) - Updated App Service site rules to include slots. [#100](https://github.com/BernieWhite/PSRule.Rules.Azure/issues/100) @@ -11,6 +13,10 @@ - Unattached network interfaces. [#92](https://github.com/BernieWhite/PSRule.Rules.Azure/issues/92) - Added NSG rule to check for lateral traversal security rules. [#103](https://github.com/BernieWhite/PSRule.Rules.Azure/issues/103) +Additional notes: + +- Requires pre-release v0.8.0-B190716 of PSRule. + ## v0.3.0-B190710 (pre-release) - Fix handling of empty DNS servers in `Azure.VirtualNetwork.LocalDNS`. [#84](https://github.com/BernieWhite/PSRule.Rules.Azure/issues/84) diff --git a/pipeline.build.ps1 b/pipeline.build.ps1 index 374ddaf3f8f..c4860cc740a 100644 --- a/pipeline.build.ps1 +++ b/pipeline.build.ps1 @@ -46,6 +46,10 @@ if ($version -like '*-*') { Write-Host -Object "[Pipeline] -- Using version: $version" -ForegroundColor Green; Write-Host -Object "[Pipeline] -- Using versionSuffix: $versionSuffix" -ForegroundColor Green; +if ($Env:coverage -eq 'true') { + $CodeCoverage = $True; +} + # Copy the PowerShell modules files to the destination path function CopyModuleFiles { param (