-
Notifications
You must be signed in to change notification settings - Fork 10
/
azure-pipelines.yml
117 lines (99 loc) · 4.24 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
npm_config_cache: $(Pipeline.Workspace)/.npm
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: CmdLine@2
displayName: 'Install gitversion'
inputs:
script: 'dotnet tool install --global GitVersion.Tool --version 5.8.1'
- task: PowerShell@2
displayName: 'GitVersion'
inputs:
targetType: 'inline'
script: 'dotnet gitversion /l console /output buildserver /updateAssemblyInfo'
- task: DotNetCoreCLI@2
displayName: 'Run unit tests'
inputs:
command: test
projects: 'RX.Nyss.sln'
arguments: '/p:NoNpmInstall=true /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Exclude="[RX.Nyss.Web.Views]*%2c[RX.Nyss.Data]*%2c[RX.Nyss.Web]RX.Nyss.Web.Data.*%2c[RX.Nyss.*]*.Dto.*%2c[RX.Nyss.*]*.Contracts.*%2c[RX.Nyss.*]*.Models.*%2c[RX.Nyss.*]*.Configuration.*%2c[RX.Nyss.*]*.Migrations.*%2c[RX.Nyss.*]*.Utils.Logging.*%2c[RX.Nyss.*]*.Startup%2c[RX.Nyss.*]*.Program%2c[RX.Nyss.*]*.Pages.ErrorModel"'
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
displayName: ReportGenerator
inputs:
reports: '$(Build.SourcesDirectory)/tests/**/coverage.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)/CodeCoverage'
reporttypes: 'Cobertura'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/CodeCoverage/Cobertura.xml'
- task: DotNetCoreCLI@2
displayName: 'Publish RX.Nyss.Web'
inputs:
command: publish
publishWebProjects: false
arguments: 'src/RX.Nyss.Web/RX.Nyss.Web.csproj -c Release -o "$(Build.ArtifactStagingDirectory)/webapp" /p:Version=$(GitVersion.MajorMinorPatch) --runtime win-x86 --self-contained false'
zipAfterPublish: true
modifyOutputPath: false
- task: DotNetCoreCLI@2
displayName: 'Publish RX.Nyss.Data.MigrationApp'
inputs:
command: publish
publishWebProjects: false
arguments: 'src/RX.Nyss.Data.MigrationApp/RX.Nyss.Data.MigrationApp.csproj -c Release -o "$(Build.ArtifactStagingDirectory)/migrationapp" /p:Version=$(GitVersion.MajorMinorPatch) --runtime win-x86 --self-contained false'
zipAfterPublish: false
modifyOutputPath: false
- task: DotNetCoreCLI@2
displayName: 'Publish RX.Nyss.FuncApp'
inputs:
command: publish
publishWebProjects: false
arguments: 'src/RX.Nyss.FuncApp/RX.Nyss.FuncApp.csproj -c Release -o "$(Build.ArtifactStagingDirectory)/funcapp" /p:Version=$(GitVersion.MajorMinorPatch) --self-contained false'
zipAfterPublish: true
modifyOutputPath: false
- task: DotNetCoreCLI@2
displayName: 'Publish RX.Nyss.ReportFuncApp'
inputs:
command: publish
publishWebProjects: false
arguments: 'src/RX.Nyss.ReportFuncApp/RX.Nyss.ReportFuncApp.csproj -c Release -o "$(Build.ArtifactStagingDirectory)/reportfuncapp" /p:Version=$(GitVersion.MajorMinorPatch) --self-contained false'
zipAfterPublish: true
modifyOutputPath: false
- task: DotNetCoreCLI@2
displayName: 'Publish RX.Nyss.ReportApi'
inputs:
command: publish
publishWebProjects: false
arguments: 'src/RX.Nyss.ReportApi/RX.Nyss.ReportApi.csproj -c Release -o "$(Build.ArtifactStagingDirectory)/reportapi" /p:Version=$(GitVersion.MajorMinorPatch) --runtime win-x86 --self-contained false'
zipAfterPublish: true
modifyOutputPath: false
- task: DotNetCoreCLI@2
displayName: 'Publish RX.Nyss.PublicApiFuncApp'
inputs:
command: publish
publishWebProjects: false
arguments: 'src/RX.Nyss.PublicApiFuncApp/RX.Nyss.PublicApiFuncApp.csproj -c Release -o "$(Build.ArtifactStagingDirectory)/publicapifuncapp" /p:Version=$(GitVersion.MajorMinorPatch) --self-contained false'
zipAfterPublish: true
modifyOutputPath: false
- task: CopyFiles@2
inputs:
SourceFolder: 'Infrastructure'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/Infrastructure'
- task: CopyFiles@2
inputs:
SourceFolder: 'scripts'
Contents: '*.sql'
TargetFolder: '$(Build.ArtifactStagingDirectory)/scripts'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'