Skip to content

Commit 498a937

Browse files
committed
[202211, PR test] Use feature branch as the sonic-mgmt branch
1 parent 938dd32 commit 498a937

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

azure-pipelines.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ stages:
8181
value: veos_vtb
8282
- name: testbed_file
8383
value: vtestbed.csv
84-
84+
- name: BUILD_BRANCH
85+
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
86+
value: $(System.PullRequest.TargetBranch)
87+
${{ else }}:
88+
value: $(Build.SourceBranchName)
8589
# For every test job:
8690
# continueOnError: false means it's a required test job and will block merge if it fails
8791
# 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)
@@ -153,7 +157,7 @@ stages:
153157
TOPOLOGY: t0
154158
MIN_WORKER: $(T0_INSTANCE_NUM)
155159
MAX_WORKER: $(T0_INSTANCE_NUM)
156-
MGMT_BRANCH: "master"
160+
MGMT_BRANCH: $(BUILD_BRANCH)
157161
SPECIFIC_PARAM: '[{"name": "telemetry/test_telemetry.py", "param": "--deselect=telemetry/test_telemetry.py::test_on_change_updates"}]'
158162

159163
- job: t0_2vlans_elastictest
@@ -168,7 +172,7 @@ stages:
168172
TEST_SET: t0-2vlans
169173
MIN_WORKER: $(T0_2VLANS_INSTANCE_NUM)
170174
MAX_WORKER: $(T0_2VLANS_INSTANCE_NUM)
171-
MGMT_BRANCH: "master"
175+
MGMT_BRANCH: $(BUILD_BRANCH)
172176
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
173177

174178
- job: t1_lag_elastictest
@@ -182,7 +186,7 @@ stages:
182186
TOPOLOGY: t1-lag
183187
MIN_WORKER: $(T1_LAG_INSTANCE_NUM)
184188
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
185-
MGMT_BRANCH: "master"
189+
MGMT_BRANCH: $(BUILD_BRANCH)
186190

187191
- job: multi_asic_elastictest
188192
pool: ubuntu-20.04
@@ -197,7 +201,7 @@ stages:
197201
MIN_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
198202
MAX_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
199203
NUM_ASIC: 4
200-
MGMT_BRANCH: "master"
204+
MGMT_BRANCH: $(BUILD_BRANCH)
201205

202206
- job: dualtor_elastictest
203207
pool: ubuntu-20.04
@@ -210,7 +214,7 @@ stages:
210214
TOPOLOGY: dualtor
211215
MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
212216
MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
213-
MGMT_BRANCH: "master"
217+
MGMT_BRANCH: $(BUILD_BRANCH)
214218
COMMON_EXTRA_PARAMS: "--disable_loganalyzer "
215219

216220
- job: sonic_t0_elastictest
@@ -225,7 +229,7 @@ stages:
225229
MIN_WORKER: $(T0_SONIC_INSTANCE_NUM)
226230
MAX_WORKER: $(T0_SONIC_INSTANCE_NUM)
227231
TEST_SET: t0-sonic
228-
MGMT_BRANCH: "master"
232+
MGMT_BRANCH: $(BUILD_BRANCH)
229233
COMMON_EXTRA_PARAMS: "--neighbor_type=sonic "
230234
VM_TYPE: vsonic
231235
SCRIPTS_EXCLUDE: "platform_tests/test_advanced_reboot.py::test_warm_reboot"

0 commit comments

Comments
 (0)