-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-pipelines.yml
159 lines (136 loc) · 3.88 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
trigger:
- master
- development
pr:
- master
- development
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download CLI'
inputs:
buildType: 'specific'
project: '7672f4c6-33ca-42f2-bfd8-1f88e64fbda5'
pipeline: '1'
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/development'
downloadType: 'single'
artifactName: 'drop'
downloadPath: '$(Build.SourcesDirectory)'
- task: ExtractFiles@1
displayName: 'Extract CLI'
inputs:
archiveFilePatterns: '$(Build.SourcesDirectory)/drop/s.zip'
destinationFolder: '$(Build.SourcesDirectory)'
cleanDestinationFolder: false
- powershell: |
choco install docfx -y
cd docFX
docfx docfx.json
if ($lastexitcode -ne 0){
throw ("Error generating document")
}
displayName: "docfx build"
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: 'dotnet build MTA Definitions'
inputs:
command: 'build'
workingDirectory: 'Slipe/Core/Source/SlipeMTADefinitions'
arguments: '--configuration $(buildConfiguration)'
- task: CopyFiles@2
displayName: 'Copy MTA definitions DLL'
inputs:
SourceFolder: 'Slipe/Core/Source/SlipeMTADefinitions/bin/$(buildConfiguration)/netcoreapp3.1/'
Contents: 'SlipeMTADefinitions.dll'
TargetFolder: 'Slipe/Core/DLL'
- task: DotNetCoreCLI@2
displayName: 'dotnet build SQL'
inputs:
command: 'build'
workingDirectory: 'Slipe/Core/Source/SlipeSql'
arguments: '--configuration $(buildConfiguration)'
- task: CopyFiles@2
displayName: 'Copy SQL DLL'
inputs:
SourceFolder: 'Slipe/Core/Source/SlipeSql/bin/$(buildConfiguration)/netcoreapp3.1/'
Contents: 'Slipe.Sql.dll'
TargetFolder: 'Slipe/Core/DLL'
- task: DotNetCoreCLI@2
displayName: 'dotnet build shared'
inputs:
command: 'build'
workingDirectory: 'Slipe/Core/Source/SlipeShared'
arguments: '--configuration $(buildConfiguration)'
- task: CopyFiles@2
displayName: 'Copy shared DLL'
inputs:
SourceFolder: 'Slipe/Core/Source/SlipeShared/bin/$(buildConfiguration)/netcoreapp3.1/'
Contents: 'SlipeShared.dll'
TargetFolder: 'Slipe/Core/DLL'
- task: DotNetCoreCLI@2
displayName: 'dotnet build client'
inputs:
command: 'build'
workingDirectory: 'Slipe/Core/Source/SlipeClient'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'dotnet build server'
inputs:
command: 'build'
workingDirectory: 'Slipe/Core/Source/SlipeServer'
arguments: '--configuration $(buildConfiguration)'
# - task: DotNetCoreCLI@2
# displayName: 'dotnet build Docs'
# inputs:
# command: 'build'
# arguments: 'DocFX/DocFX.csproj --configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: 'test'
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/*.sln'
arguments: '--output $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'publish artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: DeleteFiles@1
inputs:
SourceFolder:
Contents: 'Slipe/Core/Source/*'
- task: DeleteFiles@1
inputs:
SourceFolder:
Contents: '**/Build/*'
- task: PublishBuildArtifacts@1
displayName: 'publish artifacts'
inputs:
PathtoPublish: 'Slipe'
ArtifactName: 'slipe'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
displayName: 'publish artifacts'
inputs:
PathtoPublish: 'DocFX/_site'
ArtifactName: 'site'
publishLocation: 'Container'
- task: CmdLine@2
inputs:
script: 'tree'