forked from EgoManiac/Posh-Ribbon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
60 lines (51 loc) · 1.97 KB
/
azure-pipelines.yml
File metadata and controls
60 lines (51 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
pool:
name: Hosted VS2017
steps:
- task: AzurePowerShell@4
inputs:
azureSubscription: '$(AzureID)'
ScriptType: 'InlineScript'
Inline: 'Start-AzVM -Name "$(SBC-Name)" -ResourceGroupName "$(SBC-RG)"'
azurePowerShellVersion: 'LatestVersion'
- task: gittools.gitversion.gitversion-task.GitVersion@4
displayName: GitVersion
inputs:
preferBundledVersion: false
- task: richardfennellBM.BM-VSTS-Versioning-Task.Version-PowerShellModule-Task.VersionPowerShellModule@2
displayName: 'Version PowerShell Modules'
inputs:
VersionRegex: '\d+\.\d+\.\d+'
VersionNumber: $(GitVersion.MajorMinorPatch)
- task: Pester.PesterRunner.Pester-Task.Pester@10
displayName: 'Pester Test Runner for $(SBCuser)'
inputs:
scriptFolder: "@{Path='$(System.DefaultWorkingDirectory)'; Parameters=@{uxhostname='$(SBCAddress)'; SBCuserName='$(SBCuser)'; SBCPassword='$(SBCpass)'}}"
resultsFile: '$(System.DefaultWorkingDirectory)\Test-Pester.XML'
CodeCoverageOutputFile: '$(System.DefaultWorkingDirectory)\Coverage-Pester.XML'
usePSCore: False
CodeCoverageFolder: '$(System.DefaultWorkingDirectory)'
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: NUnit
testResultsFiles: '$(System.DefaultWorkingDirectory)\Test-Pester.XML'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from $(System.DefaultWorkingDirectory)\Coverage-Pester.XML'
condition: succeededOrFailed()
inputs:
summaryFileLocation: '$(System.DefaultWorkingDirectory)\Coverage-Pester.XML'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
**\*.psd1
**\*.psm1
**\*.md
**\LICENSE
**\Tests\*
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop\Posh-Ribbon'