-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-pipelines.yml1
164 lines (132 loc) · 5.87 KB
/
azure-pipelines.yml1
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
name: $(VersionNumberMajor).$(VersionNumberMinor)$(Rev:.rrrr)
resources:
- repo: self
fetchDepth: 15
variables:
VersionNumberMajor: '0'
VersionNumberMinor: '0'
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
BuildPlatformX64: 'x64'
ServiceFabricProjectFolderNames: ['SFA.DAS.Payments.EarningEvents.ServiceFabric', 'SFA.DAS.Payments.FundingSource.ServiceFabric', 'SFA.DAS.Payments.RequiredPayments.ServiceFabric', 'SFA.DAS.Payments.ProviderPayments.ServiceFabric', 'SFA.DAS.Payments.Monitoring.ServiceFabric', 'SFA.DAS.Payments.Audit.ServiceFabric', 'SFA.DAS.Payments.DataLocks.ServiceFabric']
PrivateSettingsCheckerURL: 'https://raw.githubusercontent.com/SkillsFundingAgency/DC-Tools/master/Scripts/PrivateSettingsChecker.ps1'
pool:
name: DCT
demands:
- IsBuildServer
- IsBuildServerDAS
- msbuild
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core sdk 2.2.106'
inputs:
version: 2.2.106
- task: NuGetToolInstaller@0
displayName: 'Use NuGet <=4.8.0'
inputs:
versionSpec: '<=4.8.0'
- powershell: |
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("$(PrivateSettingsCheckerURL)","$env:BUILD_REPOSITORY_LOCALPATH\src\PrivateSettingsChecker.ps1")
write-host "download finished"
workingDirectory: '$(System.DefaultWorkingDirectory)/src/'
displayName: 'Download Private Settings Checker powershell script from Github'
- task: PowerShell@2
displayName: 'Generate missing Private Setting files'
inputs:
targetType: filePath
filePath: './src\PrivateSettingsChecker.ps1'
workingDirectory: '$(System.DefaultWorkingDirectory)/src/'
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
vstsFeed: '1d5deb2d-cf8b-4bb1-b147-d13bc246e3f4'
- task: MSBuild@1
displayName: 'Build sln'
inputs:
msbuildArchitecture: x64
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '/p:version=$(Build.BuildNumber) /p:FileVersion=$(Build.BuildNumber)'
clean: true
maximumCpuCount: true
logProjectEvents: true
createLogFile: true
- task: MSBuild@1
displayName: 'Build Database Project copy'
inputs:
solution: '**/SFA.DAS.Payments.Database.sqlproj'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '/p:version=$(Build.BuildNumber) /p:FileVersion=$(Build.BuildNumber)'
clean: true
maximumCpuCount: true
logProjectEvents: true
createLogFile: true
enabled: false
- task: CopyFiles@2
displayName: 'Copy Database Files to: Artifact Databases Directory'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/src/'
Contents: '**\*.dacpac'
TargetFolder: '$(build.artifactstagingdirectory)\Databases'
flattenFolders: true
- task: CopyFiles@2
displayName: 'Copy Database Files to: Artifact AcceptanceTests'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/src/'
Contents: |
**\*AcceptanceTests*\**\bin\$(BuildConfiguration)\**
TargetFolder: '$(build.artifactstagingdirectory)\AcceptanceTests'
CleanTargetFolder: true
- task: DotNetCoreCLI@2
displayName: 'dotnet build UnitTest Projects'
inputs:
projects: '**/*unittest*.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet test UnitTest Projects'
inputs:
command: test
projects: '**/*unittest*.csproj'
arguments: '--filter FullyQualifiedName~UnitTests'
#Task group has not been exported, task groups are not supported yet
#Task group has not been exported, task groups are not supported yet
#Task group has not been exported, task groups are not supported yet
#Task group has not been exported, task groups are not supported yet
#Task group has not been exported, task groups are not supported yet
#Task group has not been exported, task groups are not supported yet
#Task group has not been exported, task groups are not supported yet
- task: DotNetCoreCLI@2
displayName: 'Build Period End Project'
inputs:
projects: '**/SFA.DAS.Payments.PeriodEnd.TestEndpoint.csproj'
enabled: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
enabled: false
- task: PublishPipelineArtifact@1
displayName: 'Publish Artifact: drop'
inputs:
targetPath: '$(build.artifactstagingdirectory)'
artifact: drop
#Task group has not been exported, task groups are not supported yet
- task: PublishBuildArtifacts@1
displayName: '$(build.artifactstagingdirectory)\PeriodEnd'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\PeriodEnd'
ArtifactName: 'periodend-drop'
enabled: false
continueOnError: true
- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact - Period End'
inputs:
targetPath: '$(build.artifactstagingdirectory)\PeriodEnd'
artifact: 'periodend-drop'
- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact - Scripts drop'
inputs:
targetPath: src/Scripts
artifact: 'Scripts Drop'