This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-pipelines.yml
78 lines (76 loc) · 1.85 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
75
76
77
78
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
paths:
include:
- /src
- /_build
- nuke
- build.ps1
- azure-pipelines.yml
- gitversion.yml
pr:
branches:
include:
- '*'
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: 'windows-2019'
steps:
- task: PowerShell@2
displayName: 'Nuke build'
inputs:
targetType: filePath
filePath: ./build.ps1
arguments: 'Coverage RunSonarScanner --CoberturaReport -SonarCloudLogin $env:SonarCloudLogin'
env:
SonarCloudLogin: $(sonar_cloud_login)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/BuildOutput'
ArtifactName: 'artifacts'
- task: PublishTestResults@2
inputs:
testResultsFormat: VSTest
testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/TestResults'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/coverage/Cobertura.xml'
reportDirectory: '$(Build.SourcesDirectory)/coverage'
- stage: Deploy
condition: succeeded()
jobs:
- deployment: Deploy
pool:
vmImage: 'windows-2019'
environment: 'nuget'
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: PowerShell@2
displayName: 'Nuke build'
inputs:
targetType: filePath
filePath: ./build.ps1
arguments: 'Push -ApiKey $env:NugetToken -BaseBuildOutput $(Pipeline.Workspace)/artifacts'
env:
NugetToken: $(nuget_token)
schedules:
- cron: "0 0 * * *"
displayName: nightly
branches:
include:
- master
always: false