Skip to content

Commit

Permalink
Updated pipeline tasks to latest version (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
PlagueHO authored Apr 21, 2021
1 parent e35daa3 commit 7aa733b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 61 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for publishing code coverage to `CodeCov.io` and
Azure Pipelines - Fixes [Issue #255](https://github.com/dsccommunity/StorageDsc/issues/255).
- Updated build to use `Sampler.GitHubTasks` - Fixes [Issue #254](https://github.com/dsccommunity/StorageDsc/issues/254).
- Updated pipeline tasks to latest pattern.

### Fixed

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/StorageDsc?label=StorageDsc%20Preview)](https://www.powershellgallery.com/packages/StorageDsc/)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/StorageDsc?label=StorageDsc)](https://www.powershellgallery.com/packages/StorageDsc/)
[![codecov](https://codecov.io/gh/dsccommunity/StorageDsc/branch/main/graph/badge.svg)](https://codecov.io/gh/dsccommunity/StorageDsc)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/StorageDsc/14/main)

## Code of Conduct

Expand Down
93 changes: 33 additions & 60 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7aa733b

Please sign in to comment.