-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
74 lines (63 loc) · 2.06 KB
/
azure-pipelines.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
trigger:
branches:
include:
- '*'
pr:
branches:
include:
- master
pool:
vmImage: 'windows-latest'
name: $(Date:yyyy).$(Date:MM).$(Date:dd).$(Rev:rr)
steps:
- task: NuGetToolInstaller@1
inputs:
versionSpec:
- task: PowerShell@2
displayName: 'Powershell Build Script'
inputs:
targetType: filePath
filePath: 'Build\build.ps1'
env:
PROJECT_PUBKEY: $(Project.PubKey)
PROJECT_PUBUSER: $(Project.PubUser)
- task: PublishTestResults@2
displayName: 'Publish Test Results/TestResults_PS*.xml'
inputs:
testResultsFormat: NUnit
testResultsFiles: 'Build/TestResults_PS*.xml'
condition: succeededOrFailed()
- task: reportgenerator@4
displayName: 'Report Generator/CodeCoverage_PS*.xml'
inputs:
reports: 'Build/CodeCoverage_PS*.xml'
reporttypes: 'HtmlInline_AzurePipelines'
sourcedirs: .
condition: not(contains(variables['BHCommitMessage'],'!skipcodecoverage'))
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from Build/CodeCoverage_PS*.xml'
inputs:
summaryFileLocation: 'Build/CodeCoverage_PS*.xml'
reportDirectory: coveragereport
condition: not(contains(variables['BHCommitMessage'],'!skipcodecoverage'))
- task: ArchiveFiles@2
displayName: 'ZIP build directory'
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildNumber).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'zip'
publishLocation: 'Container'
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.SourcesDirectory)\BuildOutput\*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '/8e899429-2204-41f0-820a-3b7b5cb96ddd'
verbosityPush: 'Detailed'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))