From 137a69fb0dbcb92cc009f927693ce071b5f5ea69 Mon Sep 17 00:00:00 2001 From: Daniel Scott-Raynsford Date: Wed, 21 Apr 2021 23:22:15 +1200 Subject: [PATCH] Updated pipeline tasks to latest version (#257) --- CHANGELOG.md | 11 ++++-- README.md | 1 - azure-pipelines.yml | 93 ++++++++++++++++----------------------------- 3 files changed, 41 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73d23dd..f2d3e37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Added support for publishing code coverage to `CodeCov.io` and + Azure Pipelines - Fixes [Issue #255](https://github.com/dsccommunity/CertificateDsc/issues/255). +- Updated build to use `Sampler.GitHubTasks` - Fixes [Issue #254](https://github.com/dsccommunity/CertificateDsc/issues/254). +- Corrected changelog. +- Updated pipeline tasks to latest pattern. + ## [5.1.0] - 2021-02-26 ### Added @@ -26,9 +34,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 performance - Fixes [Issue #221](https://github.com/dsccommunity/CertificateDsc/issues/221). - Added warning messages into empty catch blocks in `Certificate.PDT` module to assist with debugging. -- Added support for publishing code coverage to `CodeCov.io` and - Azure Pipelines - Fixes [Issue #255](https://github.com/dsccommunity/CertificateDsc/issues/255). -- Updated build to use `Sampler.GitHubTasks` - Fixes [Issue #254](https://github.com/dsccommunity/CertificateDsc/issues/254). ### Fixed diff --git a/README.md b/README.md index ab3d5ba..535eff8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ [![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/CertificateDsc?label=CertificateDsc%20Preview)](https://www.powershellgallery.com/packages/CertificateDsc/) [![PowerShell Gallery](https://img.shields.io/powershellgallery/v/CertificateDsc?label=CertificateDsc)](https://www.powershellgallery.com/packages/CertificateDsc/) [![codecov](https://codecov.io/gh/dsccommunity/StorageDsc/branch/main/graph/badge.svg)](https://codecov.io/gh/dsccommunity/CertificateDsc) -![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/CertificateDsc/14/main) ## Code of Conduct diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e890d6d..c2301d8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,12 +43,13 @@ stages: env: ModuleVersion: $(gitVersion.Informationalversion) - - task: PublishBuildArtifacts@1 - displayName: 'Publish Build Artifact' + - task: PublishPipelineArtifact@1 + displayName: 'Publish Pipeline Artifact' inputs: - PathtoPublish: 'output/' - ArtifactName: 'output' - publishLocation: 'Container' + targetPath: '$(buildFolderName)/' + artifact: $(buildArtifactName) + publishLocation: 'pipeline' + parallel: true - stage: Test dependsOn: Build @@ -59,13 +60,12 @@ stages: vmImage: 'windows-2019' timeoutInMinutes: 0 steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact' inputs: buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' + artifactName: $(buildArtifactName) + targetPath: '$(Build.SourcesDirectory)/$(buildArtifactName)' - task: PowerShell@2 name: test @@ -89,20 +89,12 @@ stages: 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 - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact' inputs: buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' + artifactName: $(buildArtifactName) + targetPath: '$(Build.SourcesDirectory)/$(buildArtifactName)' - task: PowerShell@2 name: test @@ -134,20 +126,12 @@ stages: vmImage: 'ubuntu 16.04' timeoutInMinutes: 0 steps: - - pwsh: | - $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 - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact' inputs: buildType: 'current' - downloadType: 'single' artifactName: $(buildArtifactName) - downloadPath: '$(Build.SourcesDirectory)' + targetPath: '$(Build.SourcesDirectory)/$(buildArtifactName)' - task: DownloadPipelineArtifact@2 displayName: 'Download Test Artifact' @@ -173,13 +157,12 @@ stages: vmImage: 'vs2017-win2016' timeoutInMinutes: 0 steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact' inputs: buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' + artifactName: $(buildArtifactName) + targetPath: '$(Build.SourcesDirectory)/$(buildArtifactName)' - task: PowerShell@2 name: configureWinRM @@ -211,20 +194,12 @@ stages: vmImage: 'windows-2019' 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 - displayName: 'Set Environment Variables' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact' inputs: buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' + artifactName: $(buildArtifactName) + targetPath: '$(Build.SourcesDirectory)/$(buildArtifactName)' - task: PowerShell@2 name: test @@ -248,13 +223,12 @@ stages: vmImage: 'windows-2019' timeoutInMinutes: 0 steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact' inputs: buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' + artifactName: $(buildArtifactName) + targetPath: '$(Build.SourcesDirectory)/$(buildArtifactName)' - task: PowerShell@2 name: configureWinRM @@ -297,13 +271,12 @@ stages: pool: vmImage: 'ubuntu 16.04' steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifact' + - task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact' inputs: buildType: 'current' - downloadType: 'single' - artifactName: 'output' - downloadPath: '$(Build.SourcesDirectory)' + artifactName: $(buildArtifactName) + targetPath: '$(Build.SourcesDirectory)/$(buildArtifactName)' - task: PowerShell@2 name: publishRelease