Skip to content

Commit

Permalink
Merge pull request #70 from PlagueHO/Issue-69
Browse files Browse the repository at this point in the history
Change CI pipeline images - fixes #69
  • Loading branch information
PlagueHO committed Jan 31, 2020
2 parents 2b966c5 + 2c28945 commit b92baf6
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Changed CI pipeline HQRM Test image to use `windows-2019` Azure DevOps hosted
image - fixes [issue #69](https://github.com/dsccommunity/WSManDsc/issues/69)
- Changed CI pipeline Unit Test image to use `vs2017-win2016` Azure
DevOps hosted image - fixes [issue #69](https://github.com/dsccommunity/WSManDsc/issues/69)
- Added CI pipeline stages for running Integration and Unit tests on
Windows Server 2016 and Windows Server 2019 respectively.

## [3.1.0] - 2020-01-15

### Added
Expand Down
96 changes: 88 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ stages:
- job: Test_HQRM
displayName: 'HQRM'
pool:
vmImage: 'win1803'
vmImage: 'windows-2019'
timeoutInMinutes: 0
steps:
- task: DownloadBuildArtifacts@0
Expand All @@ -77,10 +77,90 @@ stages:
testRunTitle: 'HQRM'
condition: succeededOrFailed()

- job: Test_Unit
displayName: 'Unit'
- job: Test_Unit_2016
displayName: 'Unit (Windows Server 2016)'
pool:
vmImage: 'vs2017-win2016'
timeoutInMinutes: 0
steps:
- powershell: |
$repositoryOwner,$repositoryName = $env:BUILD_REPOSITORY_NAME -split '/'
echo "##vso[task.setvariable variable=RepositoryOwner;isOutput=true]$repositoryOwner"
echo "##vso[task.setvariable variable=RepositoryName;isOutput=true]$repositoryName"
name: dscBuildVariable
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'

- task: PowerShell@2
name: test
displayName: 'Run Unit Test'
inputs:
filePath: './build.ps1'
arguments: "-Tasks test -PesterScript 'tests/Unit'"
pwsh: false

- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Unit (Windows Server 2016)'
condition: succeededOrFailed()

- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
condition: succeededOrFailed()
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: Test_Integration_2016
displayName: 'Integration (Windows Server 2016)'
pool:
vmImage: 'vs2017-win2016'
timeoutInMinutes: 0
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'

- task: PowerShell@2
name: configureWinRM
displayName: 'Configure WinRM'
inputs:
targetType: 'inline'
script: 'winrm quickconfig -quiet'
pwsh: false

- task: PowerShell@2
name: test
displayName: 'Run Integration Test'
inputs:
filePath: './build.ps1'
arguments: "-Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0"
pwsh: false

- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Integration (Windows Server 2016)'
condition: succeededOrFailed()

- job: Test_Unit_2019
displayName: 'Unit (Windows Server 2019)'
pool:
vmImage: 'win1803'
vmImage: 'windows-2019'
timeoutInMinutes: 0
steps:
- powershell: |
Expand Down Expand Up @@ -108,7 +188,7 @@ stages:
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Unit'
testRunTitle: 'Unit (Windows Server 2019)'
condition: succeededOrFailed()

- task: PublishCodeCoverageResults@1
Expand All @@ -119,8 +199,8 @@ stages:
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: Test_Integration
displayName: 'Integration'
- job: Test_Integration_2019
displayName: 'Integration (Windows Server 2019)'
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 0
Expand Down Expand Up @@ -154,7 +234,7 @@ stages:
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Integration'
testRunTitle: 'Integration (Windows Server 2019)'
condition: succeededOrFailed()

- stage: Deploy
Expand Down

0 comments on commit b92baf6

Please sign in to comment.