forked from jeremylindsayni/EverythingAsCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
137 lines (123 loc) · 4.2 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
trigger:
- master
variables:
subscription: 'Visual Studio Professional with MSDN'
stages:
- stage: build
displayName: 'Build and test the website'
jobs:
- job: run_build
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: echo Build
displayName: 'First step in building the website skeleton'
- stage: build_integration
displayName: 'Build the integration environment resource group'
dependsOn: build
jobs:
- template: ci/templates/create-resource-group.yml
parameters:
name: create_infrastructure
displayName: 'First step in building the integration infrastructure'
vmImage: 'Ubuntu-16.04'
resourceGroupName: integration
subscription: $(subscription)
- stage: deploy_app_service_to_integration
displayName: 'Deploy the app service to the integration environment'
dependsOn: build_integration
jobs:
- job: deploy_app_service_to_integration
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: AzureResourceGroupDeployment@2
inputs:
azureSubscription: '$(subscription)'
action: 'Create Or Update Resource Group'
resourceGroupName: 'integration-rg'
location: 'UK South'
templateLocation: 'URL of the file'
csmFileLink: 'https://raw.githubusercontent.com/jeremylindsayni/EverythingAsCode/master/SimpleAzureAppService/SimpleAzureAppService/WebSite.json'
overrideParameters: '-hostingPlanName integration-webfarm'
deploymentMode: 'Incremental'
- stage: deploy_to_integration
displayName: 'Deploy the website to the integration environment'
dependsOn: deploy_app_service_to_integration
jobs:
- job: deploy_artefacts_to_integration
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: echo Deploy Website to Integration
displayName: 'First step in deploying the website to integration'
- stage: run_system_quality_tests
displayName: 'Run the system quality tests'
dependsOn: deploy_to_integration
jobs:
- job: run_non_functional_tests
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: echo Run system quality tests
displayName: 'Running the system quality tests'
- stage: build_test
displayName: 'Build the test environment'
dependsOn: deploy_to_integration
jobs:
- template: ci/templates/create-resource-group.yml
parameters:
name: create_infrastructure
displayName: 'First step in building the test infrastructure'
vmImage: 'Ubuntu-16.04'
resourceGroupName: testing
subscription: $(subscription)
- stage: deploy_app_service_to_test
displayName: 'Deploy the app service to the test environment'
dependsOn: build_test
jobs:
- job: deploy_app_service_to_test
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: AzureResourceGroupDeployment@2
inputs:
azureSubscription: '$(subscription)'
action: 'Create Or Update Resource Group'
resourceGroupName: 'test-rg'
location: 'UK South'
templateLocation: 'URL of the file'
csmFileLink: 'https://raw.githubusercontent.com/jeremylindsayni/EverythingAsCode/master/SimpleAzureAppService/SimpleAzureAppService/WebSite.json'
overrideParameters: '-hostingPlanName test-webfarm'
deploymentMode: 'Incremental'
- stage: deploy_to_test
displayName: 'Deploy the website to the test environment'
dependsOn: deploy_app_service_to_test
jobs:
- job: deploy_artefacts_to_test
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: echo Deploy Website to Test
displayName: 'First step in deploying the website to test'
- stage: build_demo
displayName: 'Build the demo environment'
dependsOn: deploy_to_test
jobs:
- template: ci/templates/create-resource-group.yml
parameters:
name: create_infrastructure
displayName: 'First step in building the demo infrastructure'
vmImage: 'Ubuntu-16.04'
resourceGroupName: demonstration
subscription: $(subscription)
- stage: deploy_to_demo
displayName: 'Deploy the website to the demo environment'
dependsOn: build_demo
jobs:
- job: deploy_artefacts_to_demo
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: echo Deploy Website to Demo
displayName: 'First step in deploying the website to demo'