From 85d00b4d0c5eeddb4b19f58ce82b5f2276c710cd Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Tue, 10 Jan 2023 19:32:19 +0100 Subject: [PATCH] DnsServerDsc: Remove left-over debug code (#270) - DnsServerDsc - Removed left-over debug code. - Update to use the build worker `windows-latest` for the necessary stages of the pipeline, and `ubuntu-latest` for the other stages. - Update pipeline to use _GitVersion.Tool_ installed by `dotnet`. --- CHANGELOG.md | 4 ++++ azure-pipelines.yml | 41 ++++++++++++++++++++++------------------- debug.ps1 | 1 - 3 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 debug.ps1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e509f66..ed07f84f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 public function `ConvertFrom-DscResourceInstance` (from _DscResource.Common_). - Updated wiki start page with deprecation notice. - Updated issue template for proposing a new resource. + - Removed left-over debug code. + - Update to use the build worker `windows-latest` for the necessary stages + of the pipeline, and `ubuntu-latest` for the other stages. + - Update pipeline to use _GitVersion.Tool_ installed by `dotnet`. ### Fixed diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5eb88d84..94f6cc3e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,14 +22,17 @@ stages: - job: Package_Module displayName: 'Package Module' pool: - vmImage: 'ubuntu 16.04' + vmImage: 'windows-latest' steps: - - task: GitVersion@5 - name: gitVersion - displayName: 'Evaluate Next Version' - inputs: - runtime: 'core' - configFilePath: 'GitVersion.yml' + - pwsh: | + dotnet tool install --global GitVersion.Tool + $gitVersionObject = dotnet-gitversion | ConvertFrom-Json + $gitVersionObject.PSObject.Properties.ForEach{ + Write-Host -Object "Setting Task Variable '$($_.Name)' with value '$($_.Value)'." + Write-Host -Object "##vso[task.setvariable variable=$($_.Name);]$($_.Value)" + } + Write-Host -Object "##vso[build.updatebuildnumber]$($gitVersionObject.FullSemVer)" + displayName: Calculate ModuleVersion (GitVersion) - task: PowerShell@2 name: package displayName: 'Build & Package Module' @@ -38,9 +41,9 @@ stages: arguments: '-ResolveDependency -tasks pack' pwsh: true env: - ModuleVersion: $(gitVersion.NuGetVersionV2) + ModuleVersion: $(NuGetVersionV2) - task: PublishPipelineArtifact@1 - displayName: 'Publish Pipeline Artifact' + displayName: 'Publish Build Artifact' inputs: targetPath: '$(buildFolderName)/' artifact: $(buildArtifactName) @@ -53,11 +56,11 @@ stages: - job: Test_HQRM displayName: 'HQRM' pool: - vmImage: 'windows-2019' + vmImage: 'windows-latest' timeoutInMinutes: 0 steps: - task: DownloadPipelineArtifact@2 - displayName: 'Download Pipeline Artifact' + displayName: 'Download Build Artifact' inputs: buildType: 'current' artifactName: $(buildArtifactName) @@ -80,11 +83,11 @@ stages: - job: Test_Unit displayName: 'Unit' pool: - vmImage: 'windows-2019' + vmImage: 'windows-latest' timeoutInMinutes: 0 steps: - task: DownloadPipelineArtifact@2 - displayName: 'Download Pipeline Artifact' + displayName: 'Download Build Artifact' inputs: buildType: 'current' artifactName: $(buildArtifactName) @@ -113,11 +116,11 @@ stages: - job: Test_Integration displayName: 'Integration' pool: - vmImage: 'windows-2019' + vmImage: 'windows-latest' timeoutInMinutes: 0 steps: - task: DownloadPipelineArtifact@2 - displayName: 'Download Pipeline Artifact' + displayName: 'Download Build Artifact' inputs: buildType: 'current' artifactName: $(buildArtifactName) @@ -152,7 +155,7 @@ stages: displayName: 'Publish Code Coverage' dependsOn: Test_Unit pool: - vmImage: 'ubuntu 16.04' + vmImage: 'ubuntu-latest' timeoutInMinutes: 0 steps: - pwsh: | @@ -162,7 +165,7 @@ stages: name: dscBuildVariable displayName: 'Set Environment Variables' - task: DownloadPipelineArtifact@2 - displayName: 'Download Pipeline Artifact' + displayName: 'Download Build Artifact' inputs: buildType: 'current' artifactName: $(buildArtifactName) @@ -198,10 +201,10 @@ stages: - job: Deploy_Module displayName: 'Deploy Module' pool: - vmImage: 'ubuntu 16.04' + vmImage: 'ubuntu-latest' steps: - task: DownloadPipelineArtifact@2 - displayName: 'Download Pipeline Artifact' + displayName: 'Download Build Artifact' inputs: buildType: 'current' artifactName: $(buildArtifactName) diff --git a/debug.ps1 b/debug.ps1 deleted file mode 100644 index 8de38edd..00000000 --- a/debug.ps1 +++ /dev/null @@ -1 +0,0 @@ -invoke-pester .\tests\Unit\DSC_DnsServerSetting.Tests.ps1