From 70c6c9a05ea2ec5d797a939676a63babecaaa756 Mon Sep 17 00:00:00 2001 From: Daniel Scott-Raynsford Date: Wed, 8 Jan 2020 16:12:36 +1300 Subject: [PATCH 1/3] Add CI display names to tasks --- CHANGELOG.md | 2 ++ azure-pipelines.yml | 41 ++++++++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da34c6b..4346199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changed `azure-pipeline.yml` to match current pattern ([Issue #59](https://github.com/dsccommunity/WSManDsc/issues/59)). - Set `testRunTitle` for PublishTestResults steps so that a helpful name is displayed in Azure DevOps for each test run. +- Set a display name on all the jobs and tasks in the CI + pipeline - fixes [issue #63](https://github.com/PowerShell/WSManDsc/issues/63) ### Deprecated diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e683820..16d3bc1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,26 +15,30 @@ pr: stages: - stage: Build jobs: - - job: BuildModuleJob + - job: Package_Module + displayName: 'Package Module' pool: vmImage: 'ubuntu 16.04' steps: - task: GitVersion@5 name: gitversion + displayName: 'Evaluate Next Version' inputs: runtime: 'core' configFilePath: 'GitVersion.yml' - task: PowerShell@2 - name: Build + name: package + displayName: 'Build & Package Module' inputs: filePath: './build.ps1' arguments: '-Tasks pack -ResolveDependency' pwsh: true env: - ModuleVersion: $(GitVersion.Informationalversion) + ModuleVersion: $(gitVersion.Informationalversion) - task: PublishBuildArtifacts@1 + displayName: 'Publish Build Artifact' inputs: PathtoPublish: 'output/' ArtifactName: 'output' @@ -44,11 +48,13 @@ stages: dependsOn: Build jobs: - job: Test_HQRM + displayName: 'HQRM' pool: vmImage: 'win1803' timeoutInMinutes: 0 steps: - task: DownloadBuildArtifacts@0 + displayName: 'Download Build Artifact' inputs: buildType: 'current' downloadType: 'single' @@ -57,12 +63,14 @@ stages: - task: PowerShell@2 name: Test + displayName: 'Run HQRM Test' inputs: filePath: './build.ps1' arguments: '-Tasks hqrmtest' pwsh: false - task: PublishTestResults@2 + displayName: 'Publish Test Results' inputs: testResultsFormat: 'NUnit' testResultsFiles: 'output/testResults/NUnit*.xml' @@ -78,7 +86,7 @@ stages: $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 + name: dscBuildVariable - task: DownloadBuildArtifacts@0 inputs: buildType: 'current' @@ -87,13 +95,15 @@ stages: downloadPath: '$(Build.SourcesDirectory)' - task: PowerShell@2 - name: Test + 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' @@ -101,11 +111,12 @@ stages: 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)' + pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)' - job: Test_Integration pool: @@ -113,6 +124,7 @@ stages: timeoutInMinutes: 0 steps: - task: DownloadBuildArtifacts@0 + displayName: 'Download Build Artifact' inputs: buildType: 'current' downloadType: 'single' @@ -120,20 +132,23 @@ stages: downloadPath: '$(Build.SourcesDirectory)' - task: PowerShell@2 - name: ConfigureWinRM + name: configureWinRM + displayName: 'Configure WinRM' inputs: targetType: 'inline' script: 'winrm quickconfig -quiet' pwsh: false - task: PowerShell@2 - name: Test + 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' @@ -152,11 +167,13 @@ stages: ) ) jobs: - - job: Deploy_Artefact + - job: Deploy_Module + displayName: 'Deploy Module' pool: vmImage: 'ubuntu 16.04' steps: - task: DownloadBuildArtifacts@0 + displayName: 'Download Build Artifact' inputs: buildType: 'current' downloadType: 'single' @@ -164,7 +181,8 @@ stages: downloadPath: '$(Build.SourcesDirectory)' - task: PowerShell@2 - name: publish_prerelease + name: publishPrerelease + displayName: 'Publish Prerelease' inputs: filePath: './build.ps1' arguments: '-tasks publish' @@ -174,7 +192,8 @@ stages: GalleryApiToken: $(GalleryApiToken) - task: PowerShell@2 - name: send_changelog_PR + name: sendChangelogPR + displayName: 'Send Changelog PR' inputs: filePath: './build.ps1' arguments: '-tasks Create_ChangeLog_GitHub_PR' From 232e6505796c1ae3f78d4d628191f9b34749f2c6 Mon Sep 17 00:00:00 2001 From: Daniel Scott-Raynsford Date: Wed, 8 Jan 2020 20:40:19 +1300 Subject: [PATCH 2/3] Changes as per PR comments --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 16d3bc1..47a80e5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -181,7 +181,7 @@ stages: downloadPath: '$(Build.SourcesDirectory)' - task: PowerShell@2 - name: publishPrerelease + name: publishRelease displayName: 'Publish Prerelease' inputs: filePath: './build.ps1' From 57f9ad131aea8b1ef77c8bb6d9c40f5b36bafd8f Mon Sep 17 00:00:00 2001 From: Daniel Scott-Raynsford Date: Thu, 9 Jan 2020 19:09:40 +1300 Subject: [PATCH 3/3] Fix as per PR comments --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 47a80e5..4403977 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -78,6 +78,7 @@ stages: condition: succeededOrFailed() - job: Test_Unit + displayName: 'Unit' pool: vmImage: 'win1803' timeoutInMinutes: 0 @@ -119,6 +120,7 @@ stages: pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)' - job: Test_Integration + displayName: 'Integration' pool: vmImage: 'windows-2019' timeoutInMinutes: 0 @@ -182,7 +184,7 @@ stages: - task: PowerShell@2 name: publishRelease - displayName: 'Publish Prerelease' + displayName: 'Publish Release' inputs: filePath: './build.ps1' arguments: '-tasks publish'