-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
148 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,149 @@ | ||
resources: | ||
repositories: | ||
- repository: common | ||
type: github | ||
name: scrthq/PSGSuite | ||
- repo: self | ||
clean: true | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- master | ||
- "*" | ||
exclude: | ||
- refs/tag/* | ||
|
||
phases: | ||
- phase: Phase_1 | ||
displayName: Compile Module | ||
|
||
condition: succeeded() | ||
queue: | ||
name: Hosted VS2017 | ||
|
||
steps: | ||
- powershell: . ./build.ps1 -Task Compile | ||
displayName: Compile | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: Built Module' | ||
inputs: | ||
PathtoPublish: Release | ||
ArtifactName: Release | ||
|
||
|
||
- phase: Phase_2 | ||
displayName: Test Module on Windows (PSv5) | ||
|
||
dependsOn: Phase_1 | ||
condition: succeeded() | ||
queue: | ||
name: Hosted VS2017 | ||
|
||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download Build Artifacts' | ||
inputs: | ||
artifactName: Release | ||
downloadPath: '$(Build.SourcesDirectory)' | ||
|
||
- powershell: . ./build.ps1 -Task Pester | ||
displayName: Test | ||
|
||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results **/Test*.xml' | ||
inputs: | ||
testRunner: NUnit | ||
testResultsFiles: '**/Test*.xml' | ||
condition: succeededOrFailed() | ||
|
||
|
||
- phase: Phase_3 | ||
displayName: Test Module on Ubuntu | ||
|
||
dependsOn: Phase_1 | ||
condition: succeeded() | ||
queue: | ||
name: Hosted Ubuntu 1604 | ||
|
||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download Build Artifacts' | ||
inputs: | ||
artifactName: Release | ||
downloadPath: '$(Build.SourcesDirectory)' | ||
|
||
- powershell: . ./build.ps1 -Task Pester | ||
displayName: Test | ||
|
||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results **/Test*.xml' | ||
inputs: | ||
testRunner: NUnit | ||
testResultsFiles: '**/Test*.xml' | ||
condition: succeededOrFailed() | ||
|
||
|
||
- phase: Phase_4 | ||
displayName: Test Module on macOS | ||
|
||
dependsOn: Phase_1 | ||
condition: succeeded() | ||
queue: | ||
name: Hosted macOS | ||
|
||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download Build Artifacts' | ||
inputs: | ||
artifactName: Release | ||
downloadPath: '$(Build.SourcesDirectory)' | ||
|
||
- powershell: . ./build.ps1 -Task Pester | ||
displayName: Test | ||
|
||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results **/Test*.xml' | ||
inputs: | ||
testRunner: NUnit | ||
testResultsFiles: '**/Test*.xml' | ||
condition: succeededOrFailed() | ||
|
||
|
||
- phase: Phase_5 | ||
displayName: Test Module on Windows (PSv6) | ||
|
||
dependsOn: Phase_1 | ||
condition: succeeded() | ||
queue: | ||
name: Hosted VS2017 | ||
|
||
steps: | ||
- script: 'choco install powershell-core --yes' | ||
displayName: 'Install Powershell v6' | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download Build Artifacts' | ||
inputs: | ||
artifactName: Release | ||
downloadPath: '$(Build.SourcesDirectory)' | ||
|
||
- powershell: | | ||
$Env:Path = [Environment]::GetEnvironmentVariable('Path',[EnvironmentVariableTarget]::Machine) | ||
pwsh -command ". ./build.ps1 -Task Pester" | ||
displayName: Test | ||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results **/Test-*.xml' | ||
inputs: | ||
testRunner: NUnit | ||
testResultsFiles: '**/Test-*.xml' | ||
condition: succeededOrFailed() | ||
|
||
- phase: Phase_6 | ||
displayName: Deploy Module | ||
|
||
dependsOn: | ||
- Phase_2 | ||
- Phase_3 | ||
- Phase_4 | ||
- Phase_5 | ||
condition: succeeded() | ||
queue: | ||
name: Hosted VS2017 |