-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
180 lines (156 loc) · 5.18 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
trigger:
- main
pool:
vmImage: 'windows-latest'
name: Azure Pipelines
demands:
- msbuild
- java
name: '$(version)$(rev:.r)'
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.4.1'
inputs:
versionSpec: '4.x'
checkLatest: true
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: 'src/Client/Client.csproj'
feedsToUse: 'select'
vstsFeed: 'f0ee62af-6b8c-4164-8e10-8697924e97f3/c6478b1c-ac51-494d-874d-bf33d7788827'
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: 'src/Common/Common.csproj'
feedsToUse: 'select'
vstsFeed: 'f0ee62af-6b8c-4164-8e10-8697924e97f3/c6478b1c-ac51-494d-874d-bf33d7788827'
- task: Assembly-Info-NetFramework@2
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: |
**\AssemblyInfo.cs
InsertAttributes: true
FileEncoding: 'auto'
WriteBOM: false
Title: 'OpenRP.Framework.Client.net'
Product: 'Open Roleplay - Client-side Framework'
Description: 'Open Roleplay - Client-side Framework'
Company: 'KungRaseri Productions, LLC'
Copyright: 'Copyright © 2021 - KungRaseri Productions, LLC'
VersionNumber: '$(Build.BuildNumber)'
FileVersionNumber: '$(Build.BuildNumber)'
InformationalVersion: '$(Build.BuildNumber)'
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: false
- task: MSBuild@1
inputs:
solution: 'src/Client/Client.csproj'
msbuildArchitecture: 'x64'
clean: true
maximumCpuCount: true
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: 'src/Server/Server.csproj'
feedsToUse: 'select'
vstsFeed: 'f0ee62af-6b8c-4164-8e10-8697924e97f3/c6478b1c-ac51-494d-874d-bf33d7788827'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: 'src/Server/Server.csproj'
- task: Npm@1
inputs:
command: 'install'
workingDir: 'src/UI'
- task: Npm@1
inputs:
command: 'custom'
workingDir: 'src/UI'
customCommand: 'run-script build'
- task: Npm@1
inputs:
command: 'install'
workingDir: 'src/Loadscreen'
- task: Npm@1
inputs:
command: 'custom'
workingDir: 'src/Loadscreen'
customCommand: 'run-script build'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'sonarcloud'
organization: 'redacted-gaming'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'openrp-framework-ui'
cliProjectName: 'OpenRP Framework UI'
cliProjectVersion: '$(Build.BuildNumber)'
cliSources: 'src/UI'
extraProperties: |
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
sonar.projectVersion=$(version)$(rev:.r)
sonar.exclusions=src/UI/tests/**/*,src/UI/node_modules/**/*,src/UI/openrp-client-ui/**/*
sonar.tests=src/UI/tests
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
displayName: 'Publish Quality Gate Result'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'sonarcloud'
organization: 'redacted-gaming'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'openrp-loadscreen'
cliProjectName: 'OpenRP Loadscreen'
cliProjectVersion: '$(Build.BuildNumber)'
cliSources: 'src/Loadscreen'
extraProperties: |
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
sonar.projectVersion=$(version)$(rev:.r)
sonar.exclusions=src/Loadscreen/tests/**/*,src/Loadscreen/node_modules/**/*,src/Loadscreen/openrp-loadscreen-ui/**/*
sonar.tests=src/Loadscreen/tests
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
displayName: 'Publish Quality Gate Result'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'sonarcloud'
organization: 'redacted-gaming'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'openrp-framework'
cliProjectName: 'OpenRP Framework'
cliProjectVersion: '$(Build.BuildNumber)'
cliSources: 'src/'
extraProperties: |
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
sonar.projectVersion=$(version)$(rev:.r)
sonar.exclusions=src/Loadscreen/**/*,src/UI/**/*
sonar.tests=tests/
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
displayName: 'Publish Quality Gate Result'
- task: PowerShell@2
displayName: 'Compile server-data'
inputs:
targetType: filePath
filePath: ./postbuild.ps1
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: 'server-data'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'drop'
condition: succeededOrFailed()