Skip to content

Commit cd509d2

Browse files
authored
Fix pipeline (#23)
1 parent 364b19f commit cd509d2

2 files changed

Lines changed: 21 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4141
- The component `gitversion` that is used in the pipeline was wrongly configured
4242
when the repository moved to the new default branch `main`. It no longer throws
4343
an error when using newer versions of GitVersion.
44+
- Fix pipeline to use available build workers.
4445
- FileSystemAccessRule
4546
- Unit test was updated to support latest Pester.
4647
- Test was updated to handle that `build.ps1` has not been run.

azure-pipelines.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ stages:
2323
- job: Package_Module
2424
displayName: 'Package Module'
2525
pool:
26-
vmImage: 'ubuntu 16.04'
26+
vmImage: 'windows-latest'
2727
steps:
28-
- task: GitVersion@5
29-
name: gitVersion
30-
displayName: 'Evaluate Next Version'
31-
inputs:
32-
runtime: 'core'
33-
configFilePath: 'GitVersion.yml'
28+
- pwsh: |
29+
dotnet tool install --global GitVersion.Tool
30+
$gitVersionObject = dotnet-gitversion | ConvertFrom-Json
31+
$gitVersionObject.PSObject.Properties.ForEach{
32+
Write-Host -Object "Setting Task Variable '$($_.Name)' with value '$($_.Value)'."
33+
Write-Host -Object "##vso[task.setvariable variable=$($_.Name);]$($_.Value)"
34+
}
35+
Write-Host -Object "##vso[build.updatebuildnumber]$($gitVersionObject.FullSemVer)"
36+
displayName: Calculate ModuleVersion (GitVersion)
3437
- task: PowerShell@2
3538
name: package
3639
displayName: 'Build & Package Module'
@@ -39,7 +42,7 @@ stages:
3942
arguments: '-ResolveDependency -tasks pack'
4043
pwsh: true
4144
env:
42-
ModuleVersion: $(gitVersion.InformationalVersion)
45+
ModuleVersion: $(NuGetVersionV2)
4346
- task: PublishPipelineArtifact@1
4447
displayName: 'Publish Build Artifact'
4548
inputs:
@@ -54,7 +57,7 @@ stages:
5457
- job: Test_HQRM
5558
displayName: 'HQRM'
5659
pool:
57-
vmImage: 'windows-2019'
60+
vmImage: 'windows-latest'
5861
timeoutInMinutes: 0
5962
steps:
6063
- task: DownloadPipelineArtifact@2
@@ -78,10 +81,10 @@ stages:
7881
testResultsFiles: 'output/testResults/NUnit*.xml'
7982
testRunTitle: 'HQRM'
8083

81-
- job: Test_Unit_2016
82-
displayName: 'Unit Win2016'
84+
- job: Test_Unit_2022
85+
displayName: 'Unit Win2022'
8386
pool:
84-
vmImage: 'vs2017-win2016'
87+
vmImage: 'windows-2022'
8588
timeoutInMinutes: 0
8689
steps:
8790
- task: DownloadPipelineArtifact@2
@@ -138,10 +141,10 @@ stages:
138141
artifactName: $(testArtifactName)
139142
parallel: true
140143

141-
- job: Test_Integration_2016
142-
displayName: 'Integration Win2016'
144+
- job: Test_Integration_2022
145+
displayName: 'Integration Win2022'
143146
pool:
144-
vmImage: 'vs2017-win2016'
147+
vmImage: 'windows-2022'
145148
timeoutInMinutes: 0
146149
steps:
147150
- task: DownloadPipelineArtifact@2
@@ -210,7 +213,7 @@ stages:
210213
displayName: 'Publish Code Coverage'
211214
dependsOn: Test_Unit_2019
212215
pool:
213-
vmImage: 'ubuntu 16.04'
216+
vmImage: 'ubuntu-latest'
214217
timeoutInMinutes: 0
215218
steps:
216219
- pwsh: |
@@ -256,7 +259,7 @@ stages:
256259
- job: Deploy_Module
257260
displayName: 'Deploy Module'
258261
pool:
259-
vmImage: 'ubuntu 16.04'
262+
vmImage: 'ubuntu-latest'
260263
steps:
261264
- task: DownloadPipelineArtifact@2
262265
displayName: 'Download Build Artifact'

0 commit comments

Comments
 (0)