Skip to content

Commit

Permalink
Merged PR 8395437: [CI/CD, 202012] PR test always run to the end
Browse files Browse the repository at this point in the history
[CI/CD] PR test always run to the end
  • Loading branch information
yejianquan committed Jul 11, 2023
2 parents 7f218b1 + 2b3509f commit a219a8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .azure-pipelines/run-test-scheduler-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ parameters:
type: number
default: 480

- name: EXPECTED_RESULT
type: string
default: ""

steps:
- script: |
Expand Down Expand Up @@ -132,7 +135,8 @@ steps:
--num-asic ${{ parameters.NUM_ASIC }} \
--azp-access-token ":$(System.AccessToken)" \
--azp-repo-access-token $(AZP_REPO_ACCESS_TOKEN) \
--azp-pr-id $(System.PullRequest.PullRequestId)
--azp-pr-id $(System.PullRequest.PullRequestId) \
--stop-on-failure ${{ parameters.STOP_ON_FAILURE }}
TEST_PLAN_ID=`cat new_test_plan_id.txt`
Expand Down Expand Up @@ -175,7 +179,7 @@ steps:
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to sonicelastictest@microsoft.com"
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID "
# When "EXECUTING" finish, it changes into "KVMDUMP", "FAILED", "CANCELLED" or "FINISHED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state EXECUTING
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state EXECUTING --expected-result ${{ parameters.EXPECTED_RESULT }}
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Run test
Expand Down
6 changes: 6 additions & 0 deletions .pipelines/OneBranch.PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ stages:
MIN_WORKER: $(T0_INSTANCE_NUM)
MAX_WORKER: $(T0_INSTANCE_NUM)
MGMT_BRANCH: internal-202012
STOP_ON_FAILURE: False
EXPECTED_RESULT: "SUCCESS"

- job: t1_lag_elastictest
pool:
Expand All @@ -105,6 +107,8 @@ stages:
MIN_WORKER: $(T1_LAG_INSTANCE_NUM)
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
MGMT_BRANCH: internal-202012
STOP_ON_FAILURE: False
EXPECTED_RESULT: "SUCCESS"

- job: t0_2vlans_elastictest
pool:
Expand All @@ -121,3 +125,5 @@ stages:
MAX_WORKER: $(T0_2VLANS_INSTANCE_NUM)
MGMT_BRANCH: internal-202012
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
STOP_ON_FAILURE: False
EXPECTED_RESULT: "SUCCESS"

0 comments on commit a219a8f

Please sign in to comment.