forked from sonic-net/sonic-mgmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
239 lines (220 loc) · 7.41 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# For every job:
# continueOnError: false means it's a required test job and will block merge if it fails
# continueOnError: true means it's an optional test job and will not block merge even though it fails(unless a required test job depends on its result)
pr:
branches:
include:
- master
paths:
exclude:
- .github
- docs
- LICENSE
- README.md
- SECURITY.md
trigger: none
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
stages:
- stage: Pre_test
jobs:
- job: static_analysis
displayName: "Static Analysis"
timeoutInMinutes: 10
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/pre-commit-check.yml
- job: validate_test_cases
displayName: "Validate Test Cases"
timeoutInMinutes: 30
continueOnError: false
pool: sonic-common
steps:
- template: .azure-pipelines/pytest-collect-only.yml
parameters:
MGMT_BRANCH: ""
- job: dependency_check
displayName: "Dependency Check"
timeoutInMinutes: 10
continueOnError: true
pool: sonic-common
steps:
- template: .azure-pipelines/dependency-check.yml
- stage: Test
dependsOn: Pre_test
condition: and(succeeded(), in(dependencies.Pre_test.result, 'Succeeded'))
variables:
- group: SONiC-Elastictest
- name: inventory
value: veos_vtb
- name: testbed_file
value: vtestbed.yaml
- name: BUILD_BRANCH
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
value: $(System.PullRequest.TargetBranch)
${{ else }}:
value: $(Build.SourceBranchName)
jobs:
- job: t0_elastictest
displayName: "kvmtest-t0 by Elastictest"
timeoutInMinutes: 240
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: t0
MIN_WORKER: $(T0_INSTANCE_NUM)
MAX_WORKER: $(T0_INSTANCE_NUM)
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
- job: t0_2vlans_elastictest
displayName: "kvmtest-t0-2vlans by Elastictest"
timeoutInMinutes: 240
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: t0
TEST_SET: t0-2vlans
MIN_WORKER: $(T0_2VLANS_INSTANCE_NUM)
MAX_WORKER: $(T0_2VLANS_INSTANCE_NUM)
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
- job: t1_lag_elastictest
displayName: "kvmtest-t1-lag by Elastictest"
timeoutInMinutes: 240
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: t1-lag
MIN_WORKER: $(T1_LAG_INSTANCE_NUM)
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
- job: dualtor_elastictest
displayName: "kvmtest-dualtor-t0 by Elastictest"
timeoutInMinutes: 240
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: dualtor
MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
COMMON_EXTRA_PARAMS: "--disable_loganalyzer "
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
- job: multi_asic_elastictest
displayName: "kvmtest-multi-asic-t1-lag by Elastictest"
timeoutInMinutes: 240
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: t1-8-lag
TEST_SET: multi-asic-t1-lag
MIN_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
MAX_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
NUM_ASIC: 4
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
- job: sonic_t0_elastictest
displayName: "kvmtest-t0-sonic by Elastictest"
timeoutInMinutes: 240
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: t0-64-32
MIN_WORKER: $(T0_SONIC_INSTANCE_NUM)
MAX_WORKER: $(T0_SONIC_INSTANCE_NUM)
TEST_SET: t0-sonic
COMMON_EXTRA_PARAMS: "--neighbor_type=sonic "
VM_TYPE: vsonic
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
- job: dpu_elastictest
displayName: "kvmtest-dpu by Elastictest"
timeoutInMinutes: 240
continueOnError: false
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: dpu
MIN_WORKER: $(T0_SONIC_INSTANCE_NUM)
MAX_WORKER: $(T0_SONIC_INSTANCE_NUM)
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
- job: onboarding_elastictest_t0
displayName: "onboarding t0 testcases by Elastictest - optional"
timeoutInMinutes: 240
continueOnError: true
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: t0
STOP_ON_FAILURE: "False"
RETRY_TIMES: 0
MIN_WORKER: $(T0_ONBOARDING_SONIC_INSTANCE_NUM)
MAX_WORKER: $(T0_ONBOARDING_SONIC_INSTANCE_NUM)
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
TEST_SET: onboarding_t0
- job: onboarding_elastictest_t1
displayName: "onboarding t1 testcases by Elastictest - optional"
timeoutInMinutes: 240
continueOnError: true
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml
parameters:
TOPOLOGY: t1-lag
STOP_ON_FAILURE: "False"
RETRY_TIMES: 0
MIN_WORKER: $(T1_LAG_ONBOARDING_INSTANCE_NUM)
MAX_WORKER: $(T1_LAG_ONBOARDING_INSTANCE_NUM)
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
TEST_SET: onboarding_t1
# - job: onboarding_elastictest_dualtor
# displayName: "onboarding dualtor testcases by Elastictest - optional"
# timeoutInMinutes: 240
# continueOnError: true
# pool: sonic-ubuntu-1c
# steps:
# - template: .azure-pipelines/run-test-elastictest-template.yml
# parameters:
# TOPOLOGY: dualtor
# STOP_ON_FAILURE: "False"
# RETRY_TIMES: 0
# MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
# MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
# KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
# MGMT_BRANCH: $(BUILD_BRANCH)
# TEST_SET: onboarding_dualtor
# - job: wan_elastictest
# displayName: "kvmtest-wan by Elastictest"
# timeoutInMinutes: 240
# continueOnError: false
# pool: sonic-ubuntu-1c
# steps:
# - template: .azure-pipelines/run-test-elastictest-template.yml
# parameters:
# TOPOLOGY: wan-pub
# MIN_WORKER: $(WAN_INSTANCE_NUM)
# MAX_WORKER: $(WAN_INSTANCE_NUM)
# COMMON_EXTRA_PARAMS: "--skip_sanity "