-
Notifications
You must be signed in to change notification settings - Fork 175
/
azure-pipelines-index.yml
53 lines (48 loc) · 1.45 KB
/
azure-pipelines-index.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
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
sln: './src/minsk.sln'
# We only want to kick off indexing runs for Master
trigger: ['master']
# We don't want to build PRs
pr: none
steps:
- task: DotNetCoreCLI@2
displayName: Build minsk ($(buildConfiguration))
inputs:
command: build
projects: $(sln)
arguments: -c $(buildConfiguration)
- task: PowerShell@2
displayName: Generate SourceBrowser Index
inputs:
filePath: 'genindex.ps1'
- task: FtpUpload@2
displayName: Upload SourceBrowser Index
inputs:
credentialsOption: 'serviceEndpoint'
serverEndpoint: 'FTP Minsk Index'
rootDirectory: 'bin\index\index'
filePatterns: '**'
remoteDirectory: '/site/wwwroot/index'
clean: false
cleanContents: true
preservePaths: true
trustSSL: true
- task: AzureAppServiceManage@0
inputs:
azureSubscription: 'Visual Studio Enterprise(5ea88856-cbf8-44e5-8d86-35a35073a080)'
Action: 'Restart Azure App Service'
WebAppName: 'minsk-source'
SpecifySlotOrASE: true
ResourceGroupName: 'Minsk-SourceBrowser-ResourceGroup'
Slot: 'staging'
- task: AzureAppServiceManage@0
inputs:
azureSubscription: 'Visual Studio Enterprise(5ea88856-cbf8-44e5-8d86-35a35073a080)'
Action: 'Swap Slots'
WebAppName: 'minsk-source'
ResourceGroupName: 'Minsk-SourceBrowser-ResourceGroup'
SourceSlot: 'staging'