This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
azure-pipelines.yml
461 lines (376 loc) · 20.1 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
resources:
repositories:
- repository: DiagnosticServer
type: git
name: Antares/AAPT-Antares-DiagnosticServer
trigger:
batch: true
branches:
include:
- main
paths:
exclude:
- README.md
pool:
vmImage: 'windows-latest'
variables:
solution: 'DaaS/**/*.sln'
buildPlatform: 'x64'
buildConfiguration: 'Release'
LOCATION: 'West US 2'
RESOURCE_GROUP: 'DAAS-DevOps-Testing'
GitRepoAspNet: https://github.com/puneetg1983/WebCampGit
steps:
- checkout: DiagnosticServer
- checkout: self
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
displayName: 'Restore DaaS'
inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: 'config'
nugetConfigPath: 'DaaS/nuget.config'
- task: DotNetCoreCLI@2
displayName: 'Restore DiagServer'
inputs:
command: 'restore'
projects: 'AAPT-Antares-DiagnosticServer/**/*.csproj'
feedsToUse: 'config'
nugetConfigPath: 'AAPT-Antares-DiagnosticServer/nuget.config'
- task: VSBuild@1
displayName: 'Build DaaS'
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSBuild@1
displayName: 'Build and Publish DaaS'
inputs:
solution: '$(solution)'
msbuildArgs: '/p:Configuration=Release /p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:PublishProfile=FolderProfile.pubxml /p:PackageAsSingleFile=true /p:publishUrl="$(build.artifactStagingDirectory)\\"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Build DiagServer'
inputs:
command: 'build'
projects: 'AAPT-Antares-DiagnosticServer/src/diagserver/diagserver.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Publish DiagServer
inputs:
command: 'publish'
publishWebProjects: false
projects: 'AAPT-Antares-DiagnosticServer/src/diagserver/diagserver.csproj'
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: false
- task: PowerShell@2
displayName: 'Delete additional files'
inputs:
targetType: 'inline'
script: |
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\Configuration -Verbose
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\DiagnosticTools -Verbose
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\amd64 -Verbose
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\staticcontent -Verbose
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\x64 -Verbose
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\x86 -Verbose
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\DiagnosticAnalysis -Verbose
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\DiagnosticTools\DiagnosticAnalysis\DiagnosticAnalysis_OneCore_x64 -Verbose
Get-ChildItem -Path $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\diagserver\diagnosticscli -Exclude ResultsViewer.html | ForEach-Object { Remove-Item $_.FullName -Recurse -Force }
Remove-Item $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\* -include *.ps1, *.html -Verbose
Remove-Item $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\Dia2Lib.dll -Verbose
Remove-Item $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\OSExtensions.dll -Verbose
Remove-Item $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\TraceReloggerLib.dll -Verbose
$fileVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$Env:BUILD_ARTIFACTSTAGINGDIRECTORY\bin\daas.dll").FileVersion
$fileVersion
Write-Host "##vso[task.setvariable variable=DAAS_VERSION]$fileVersion"
$uniqueSiteName = "daasdevops" + (Get-Date -Format "yyyyMMdd-hhmm")
Write-Host "##vso[task.setvariable variable=SITE_NAME]$uniqueSiteName"
- task: DotNetCoreCLI@2
displayName: 'Install Dotnet Monitor'
inputs:
command: 'custom'
custom: 'tool'
arguments: install dotnet-monitor --version 6.3 --tool-path $(build.artifactStagingDirectory)/diagserver/dotnet-monitor
- task: PowerShell@2
displayName: 'Create dotnet-monitor config.json'
inputs:
targetType: 'inline'
script: |
$jsonData = @"
{
"urls": "http://0.0.0.0:50051"
}
"@
$jsonData | Out-File config.json
workingDirectory: '$(build.artifactStagingDirectory)/diagserver/dotnet-monitor'
- task: PowerShell@2
displayName: 'Print Directory Structure (only for Debugging)'
inputs:
targetType: 'inline'
script: 'Get-ChildItem $(build.artifactStagingDirectory) -recurse'
- task: ArchiveFiles@2
displayName: 'Create Daas Site Extension Zip file'
inputs:
rootFolderOrFile: '$(build.artifactStagingDirectory)'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/DaaS_$(Build.BuildId).zip'
replaceExistingArchive: true
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/DaaS_$(Build.BuildId).zip'
destinationFolder: '$(build.artifactStagingDirectory)/$(DAAS_VERSION)'
cleanDestinationFolder: true
overwriteExistingFiles: true
- task: ArchiveFiles@2
displayName: 'Create DaaS RU zip'
inputs:
rootFolderOrFile: '$(build.artifactStagingDirectory)/$(DAAS_VERSION)'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/DaaS.$(DAAS_VERSION).zip'
replaceExistingArchive: true
verbose: true
- task: PowerShell@2
displayName: 'Clean-up build artifacts folder'
inputs:
targetType: 'inline'
script: |
md $Env:AGENT_BUILDDIRECTORY\Temp\SiteExt
Copy-Item -Path $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\DaaS_$Env:BUILD_BUILDID.zip -Destination $Env:AGENT_BUILDDIRECTORY\Temp\SiteExt\DaaS_$Env:BUILD_BUILDID.zip -Verbose
Copy-Item -Path $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\DaaS.$Env:DAAS_VERSION.zip -Destination $Env:AGENT_BUILDDIRECTORY\Temp\SiteExt\DaaS.$Env:DAAS_VERSION.zip -Verbose
Write-Host Cleaning up ARTIFACTSTAGINGDIRECTORY
Remove-Item -Recurse -Force $Env:BUILD_ARTIFACTSTAGINGDIRECTORY -Verbose
md $Env:BUILD_ARTIFACTSTAGINGDIRECTORY
Copy-Item -Path $Env:AGENT_BUILDDIRECTORY\Temp\SiteExt\DaaS_$Env:BUILD_BUILDID.zip -Destination $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\DaaS_$Env:BUILD_BUILDID.zip
Copy-Item -Path $Env:AGENT_BUILDDIRECTORY\Temp\SiteExt\DaaS.$Env:DAAS_VERSION.zip -Destination $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\DaaS.$Env:DAAS_VERSION.zip
Write-Host FileVersion is $Env:DAAS_VERSION
failOnStderr: true
showWarnings: true
- task: AzurePowerShell@5
displayName: 'Setup new WebApp and upload DaaS bits'
inputs:
azureSubscription: 'Private Test Sub PUNEETG(6b6db65f-680e-4650-b97d-e82ed6a0f583)'
ScriptType: 'InlineScript'
Inline: |
try {
Write-Host ("Selected ResourceGroup is " + $Env:RESOURCE_GROUP)
Write-Host "Removing WebApps"
Get-AzResource -ResourceGroupName $Env:RESOURCE_GROUP -ResourceType Microsoft.Web/sites | Remove-AzResource -Force
Write-Host "Removing App Service Plans"
Get-AzResource -ResourceGroupName $Env:RESOURCE_GROUP -ResourceType Microsoft.Web/serverfarms | Remove-AzResource -Force
}
catch {
Write-Host "Encountered " + $_.Exception + " while cleaning up old resources"
}
Function GetHighestJavaVersion()
{
az login
$allRuntimes = az webapp list-runtimes
$runtimes = $allRuntimes | ConvertFrom-Json
$highestJavaVersion = 0
$highestJavaVersionString = ""
foreach ($inputString in $runtimes.windows) {
if ($inputString.Contains("java") -and $inputString.Contains("TOMCAT")) {
# Split the string into components
$components = $inputString -split ":"
# Extract relevant information
$javaVersion = [double]$components[1]
$javaContainer = $components[2]
$tomcatVersion = $components[3]
# Check if the current Java version is higher than the stored highest version
if ($javaVersion -gt $highestJavaVersion) {
$highestJavaVersion = $javaVersion
$highestJavaVersionString = "$javaVersion,$javaContainer,$tomcatVersion"
}
}
}
$VERSIONARRAY = $highestJavaVersionString.Split(',')
return $VERSIONARRAY
}
$CreateWebApp = {
param([string] $siteName, [string] $connectionStr, [string] $kuduEndpointVariableName, [string] $additionalParams)
Write-Host "[$(Get-Date -format 'O')][$siteName] Creating Web App"
New-AzWebApp -Name $siteName -ResourceGroupName $Env:RESOURCE_GROUP -Location $Env:LOCATION -AppServicePlan "DEVOPSTESTPLAN" | Out-Null
Set-AzWebApp -Name $siteName -ResourceGroupName $Env:RESOURCE_GROUP -AlwaysOn $true | Out-Null
Write-Host "[$(Get-Date -format 'O')][$siteName] Adding AppSettings for WebApp"
$setting=@{"MSBUILD_PATH"="%MSBUILD_15_DIR%\\msbuild.exe";"WEBSITE_DAAS_STORAGE_CONNECTIONSTRING"= "$connectionStr";"WEBSITE_DAAS_STORAGE_RESOURCEID"= "/resource/subscriptions/6b6db65f-680e-4650-b97d-e82ed6a0f583/resourceGroups/DAAS-DevOps-Testing/providers/Microsoft.Storage/storageAccounts/daasdevopsstorage"}
Set-AzWebApp -AppSettings $setting -Name $siteName -ResourceGroupName $Env:RESOURCE_GROUP | Out-Null
$kuduEndpoint = "$siteName.scm.azurewebsites.net"
$accessToken = (Get-AzAccessToken).Token
$authorizationHeader = "Bearer " + $accessToken
Write-Host ("[$(Get-Date -format 'O')][$siteName] KuduEndpoint = " + $kuduEndpoint + ". Going to upload SiteExtension bits now")
if ($additionalParams -eq "JAVA"){
#$version = GetHighestJavaVersion
#Write-Host "[$(Get-Date -format 'O')][$siteName] Found Java Version = " + $version[0] + " " + $version[1] + " " + $version[2]
$Resource = Get-AzResource -ResourceType Microsoft.Web/sites -ResourceGroupName $Env:RESOURCE_GROUP -ResourceName $siteName
$Resource.Properties.SiteConfig.JavaVersion = "17"
$Resource.Properties.SiteConfig.JavaContainer = "TOMCAT"
$Resource.Properties.SiteConfig.JavaContainerVersion = "10.0"
$Resource | Set-AzResource -Force | Out-Null
# Introduce a delay due to Java Cold-Start
Start-Sleep -Seconds 60
}
if ($additionalParams -eq "X64"){
Write-Host ("[$(Get-Date -format 'O')][$siteName] Setting bitness to x64")
Set-AzWebApp -Name $siteName -ResourceGroupName $Env:RESOURCE_GROUP -Use32BitWorkerProcess $false | Out-Null
Write-Host ("[$(Get-Date -format 'O')][$siteName] Adding Auto-Heal settings")
$autohealRules = @{
triggers=@{requests=@{count=30;timeInterval="00:02:00"}};
actions=@{actionType="CustomAction";customAction=@{exe="`"%WEBSITE_DAAS_EXTENSIONPATH%\DiagLauncher\DiagLauncher.exe`"";parameters="-m CollectKillAnalyze -t MemoryDump"}};
}
$Resource = Get-AzResource -ResourceType Microsoft.Web/sites -ResourceGroupName $Env:RESOURCE_GROUP -ResourceName $siteName
$Resource.Properties.SiteConfig.AutoHealEnabled = $true
$Resource.Properties.SiteConfig.AutoHealRules = $autohealRules
$Resource | Set-AzResource -Force | Out-Null
}
if ($additionalParams -eq "DOTNET"){
Write-Host ("[$(Get-Date -format 'O')][$siteName] Adding Auto-Heal settings")
$autohealRulesDotNet = @{
triggers=@{requests=@{count=30;timeInterval="00:02:00"}};
actions=@{actionType="CustomAction";customAction=@{exe="`"%WEBSITE_DAAS_EXTENSIONPATH%\DiagLauncher\DiagLauncher.exe`"";parameters="-m CollectAndAnalyze -t Profiler"}};
}
$Resource = Get-AzResource -ResourceType Microsoft.Web/sites -ResourceGroupName $Env:RESOURCE_GROUP -ResourceName $siteName
$Resource.Properties.SiteConfig.AutoHealEnabled = $true
$Resource.Properties.SiteConfig.AutoHealRules = $autohealRulesDotNet
$Resource | Set-AzResource -Force | Out-Null
}
Start-Sleep -Seconds 60
$kuduApiUrl = "https://$kuduEndpoint/api/zip/SiteExtensions/DaaS/"
try {
# Adding below to speed up call to Invoke-RestMethod
$ProgressPreference = 'SilentlyContinue'
$sw = [Diagnostics.Stopwatch]::StartNew()
Invoke-RestMethod -Uri $kuduApiUrl `
-Headers @{"Authorization"=$authorizationHeader;"If-Match"="*"} `
-Method PUT `
-InFile $Env:BUILD_ARTIFACTSTAGINGDIRECTORY\DaaS_$Env:BUILD_BUILDID.zip `
-ContentType "multipart/form-data" | Out-Null
$sw.Stop()
Write-Host ("[$(Get-Date -format 'O')][$siteName] Uploaded site extension in " + $sw.Elapsed)
}
catch {
Write-Host "[$(Get-Date -format 'O')][$siteName] Encountered " + $_.Exception.Response.StatusCode + " while uploading DaaS site extension"
}
# Invoke a Site change notification by adding a dummy app setting
Write-Host "[$(Get-Date -format 'O')][$siteName] Add dummy app setting"
$currentAppSettings = Get-AzWebApp -ResourceGroupName $Env:RESOURCE_GROUP -Name $siteName | Select-Object -ExpandProperty SiteConfig
$newAppSettings =@{"foo"="bar"}
foreach($item in $currentAppSettings.AppSettings){
$newAppSettings[$item.Name] = $item.Value
}
Set-AzWebApp -AppSettings $newAppSettings -Name $siteName -ResourceGroupName $Env:RESOURCE_GROUP | Out-Null
Start-Sleep -Seconds 60
# Warmup the DaaS site
Write-Host "[$(Get-Date -format 'O')][$siteName] Checking DaaS version"
$retryCount = 0;
$succeeded = $false
while( ($retryCount -lt 5) -and ($succeeded -eq $false))
{
try
{
$DaaSVersion = Invoke-RestMethod -Uri "https://$kuduEndpoint/daas/api/v2/daasversion" `
-Headers @{"Authorization"=$authorizationHeader;"If-Match"="*"}
Write-Host ("[$(Get-Date -format 'O')][$siteName] DaasVersion is " + $DaaSVersion)
$succeeded = $true
}
catch
{
Write-Host "[$(Get-Date -format 'O')][$siteName] StatusCode: " $_.Exception.Response.StatusCode.value__
Write-Host "[$(Get-Date -format 'O')][$siteName] StatusDescription:" $_.Exception.Response.StatusDescription
$retryCount++
}
}
if ($succeeded -eq $false)
{
throw "[$(Get-Date -format 'O')][$siteName] Call to get DaaS Version failed"
}
Write-Host "##vso[task.setvariable variable=$kuduEndpointVariableName]$kuduEndpoint"
Write-Host "##vso[task.setvariable variable=KUDU_AUTH_TOKEN]$accessToken"
}
$siteName = $Env:SITE_NAME
$siteNameBackup = $Env:SITE_NAME +"-backup"
$siteNameJava = $Env:SITE_NAME + "-java"
$siteNameX64 = $Env:SITE_NAME + "-x64"
Write-Host "Creating App Service Plan"
New-AzAppServicePlan -Name "DEVOPSTESTPLAN" -ResourceGroupName $Env:RESOURCE_GROUP -Location $Env:LOCATION -Tier "Basic" -WorkerSize "Small" -NumberofWorkers 2 | Out-Null
Write-Host "Checking availability of Storage Account"
$storageAccountName = "daasdevopsstorage"
$checkNameAvail = (Get-AzStorageAccountNameAvailability -Name $storageAccountName) | Select-Object NameAvailable
if ($checkNameAvail.NameAvailable) {
Write-Host "Storage Account name is available. Creating storage account"
$storageAccount = (New-AzStorageAccount -ResourceGroupName $Env:RESOURCE_GROUP `
-AccountName $storageAccountName `
-Location $Env:LOCATION `
-SkuName "Standard_GRS" `
-AllowBlobPublicAccess $false)
} else {
Write-Host "Getting existing storage account"
$storageAccount = Get-AzStorageAccount -ResourceGroupName $Env:RESOURCE_GROUP -StorageAccountName $storageAccountName
}
Write-Host "Getting connection string"
$storageAccountKeys = Get-AzStorageAccountKey -ResourceGroupName DAAS-DevOps-Testing -AccountName daasdevopsstorage
$storageAccountKey = $storageAccountKeys[0].Value
$connectionString = "DefaultEndpointsProtocol=https;AccountName=daasdevopsstorage;AccountKey=$storageAccountKey;EndpointSuffix=core.windows.net"
$sasUrl = New-AzStorageAccountSASToken -Context $storageAccount.context -Service Blob,Table,Queue -ResourceType Container,Object -Permission "acdlpruw" -ExpiryTime (Get-Date).AddDays(1)
$sasUrl = "https://daasdevopsstorage.blob.core.windows.net/memorydumps" + $sasurl
Start-Job -Name DOTNETSITE -ScriptBlock $CreateWebApp -ArgumentList ($siteName, $connectionString, "KUDU_ENDPOINT", "DOTNET") | Out-Null
Start-Job -Name DOTNETSITEBACKUP -ScriptBlock $CreateWebApp -ArgumentList ($siteNameBackup, $connectionString, "KUDU_ENDPOINT_BACKUP", "X64") | Out-Null
Start-Job -Name JAVASITE -ScriptBlock $CreateWebApp -ArgumentList ($siteNameJava , $connectionString, "KUDU_ENDPOINT_JAVA", "JAVA") | Out-Null
Start-Job -Name DOTNET64BIT -ScriptBlock $CreateWebApp -ArgumentList ($siteNameX64, $connectionString, "KUDU_ENDPOINT_X64", "X64") | Out-Null
Receive-Job -Wait -AutoRemoveJob -Name DOTNETSITE
Receive-Job -Wait -AutoRemoveJob -Name DOTNETSITEBACKUP
Receive-Job -Wait -AutoRemoveJob -Name JAVASITE
Receive-Job -Wait -AutoRemoveJob -Name DOTNET64BIT
$instancesVariableName = "WEBSITE_INSTANCES"
$accessTokenArm = (Get-AzAccessToken).Token
$authorizationHeaderArm = "Bearer " + $accessTokenArm
$instancesUrl = "https://management.azure.com/subscriptions/6b6db65f-680e-4650-b97d-e82ed6a0f583/resourcegroups/$($Env:RESOURCE_GROUP)/providers/Microsoft.Web/sites/$($siteName)/instances?api-version=2022-03-01"
Write-Host $instancesUrl
$RequestHeader = @{Authorization = $authorizationHeaderArm; 'Content-Type' = "application/json";}
$instances = Invoke-RestMethod -Headers $RequestHeader -Uri $instancesUrl | Select-Object -ExpandProperty value | Select-Object -ExpandProperty properties;
$instancesJson = $instances | ConvertTo-Json -Compress
Write-Host $instancesJson
Write-Host "##vso[task.setvariable variable=$instancesVariableName]$instancesJson"
Write-Host "##vso[task.setvariable variable=WEBSITE_DAAS_STORAGE_CONNECTIONSTRING]$connectionString"
Write-Host "##vso[task.setvariable variable=WEBSITE_DAAS_STORAGE_SASURI]$sasUrl"
azurePowerShellVersion: 'LatestVersion'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(build.artifactStagingDirectory)'
artifactName: drop
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\bin\$(BuildConfiguration)\**\*test*.dll
!**\obj\**
!**\ref\**
!**\xunit.runner.visualstudio.testadapter.dll
!**\xunit.runner.visualstudio.dotnetcore.testadapter.dll
searchFolder: '$(System.DefaultWorkingDirectory)'
runTestsInIsolation: true
codeCoverageEnabled: true
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
env:
KUDU_ENDPOINT: $(KUDU_ENDPOINT)
KUDU_AUTH_TOKEN: $(KUDU_AUTH_TOKEN)
- task: AzurePowerShell@5
displayName: 'Delete App and App Service Plan'
inputs:
azureSubscription: 'Private Test Sub PUNEETG(6b6db65f-680e-4650-b97d-e82ed6a0f583)'
ScriptType: 'InlineScript'
Inline: |
Write-Host "Removing WebApps"
Get-AzResource -ResourceGroupName $Env:RESOURCE_GROUP -ResourceType Microsoft.Web/sites | Remove-AzResource -Force
Write-Host "Removing App Service Plans"
Get-AzResource -ResourceGroupName $Env:RESOURCE_GROUP -ResourceType Microsoft.Web/serverfarms | Remove-AzResource -Force
azurePowerShellVersion: 'LatestVersion'