-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
97 lines (83 loc) · 2.94 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
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
- name: buildPlatform
value: 'Any CPU'
- name: buildConfiguration
value: 'Release'
- group: aad-access-group
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build web'
inputs:
projects: src/AadAccess.MVC/AadAccess.MVC.csproj
- task: DotNetCoreCLI@2
displayName: 'dotnet publish web'
inputs:
command: publish
publishWebProjects: false
projects: src/AadAccess.MVC/AadAccess.MVC.csproj
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/web'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: web'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/web'
ArtifactName: web
- task: DotNetCoreCLI@2
displayName: 'dotnet build api'
inputs:
projects: src/AadAccess.API/AadAccess.API.csproj
arguments: '--output $(Build.BinariesDirectory)/api'
- task: DotNetCoreCLI@2
displayName: 'dotnet publish api'
inputs:
command: publish
publishWebProjects: false
projects: 'src/AadAccess.API/AadAccess.API.csproj '
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/api'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: api'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/api'
ArtifactName: api
- task: DotNetCoreCLI@2
displayName: 'dotnet build functions'
inputs:
projects: src/AadAccess.Functions/AadAccess.Functions.csproj
arguments: '--output $(Build.BinariesDirectory)/functions --configuration $(BuildConfiguration)'
- task: ArchiveFiles@2
displayName: 'Archive functions'
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/functions'
archiveFile: '$(Build.ArtifactStagingDirectory)/functions.zip'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: functions'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/functions.zip'
ArtifactName: functions
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: devops'
inputs:
PathtoPublish: src/AadAccess.RG
ArtifactName: devops
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
downloadPath: '$(System.ArtifactsDirectory)'
artifactName: 'devops'
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
ConnectedServiceName: "$(connectedServiceName)"
subscriptionName: "$(subscriptionName)"
action: 'Create Or Update Resource Group'
resourceGroupName: "$(resourceGroupName)"
location: 'West Europe'
templateLocation: 'Linked artifact'
csmFile: '$(System.ArtifactsDirectory)/devops/Templates/azuredeploy.json'
csmParametersFile: '$(System.ArtifactsDirectory)/devops/Templates/azuredeploy.parameters.json'
overrideParameters: '-webSiteName "$(webSiteName)" -webApiName "$(webApiName)" -functionAppName "$(functionAppName)"'
deploymentMode: 'Incremental'