diff --git a/.azure-pipelines/run-test-elastictest-template.yml b/.azure-pipelines/run-test-elastictest-template.yml index 5b52a39a9fc..147cc78fb2c 100644 --- a/.azure-pipelines/run-test-elastictest-template.yml +++ b/.azure-pipelines/run-test-elastictest-template.yml @@ -142,6 +142,20 @@ parameters: type: string default: "" + - name: MIXED_PTF_IMAGE_BRANCHES + type: object + default: + - 201803 + - 201807 + - 201811 + - 201911 + - 202211 + - 202012 + - 202205 + - 202305 + - 202311 + - 202405 + steps: - ${{ if not(contains(variables['BUILD.REPOSITORY.NAME'], 'sonic-mgmt')) }}: - script: | @@ -191,6 +205,15 @@ steps: pip install PyYAML rm -f new_test_plan_id.txt + PTF_IMAGETAG="--ptf_imagetag=py3only" + for old_branch in ${{ parameters.MIXED_PTF_IMAGE_BRANCHES }} + do + if [ $old_branch == "${{ parameters.MGMT_BRANCH }}" ] + then + PTF_IMAGETAG="--ptf_imagetag=internal" + break + fi + done python ./.azure-pipelines/test_plan.py create \ -t ${{ parameters.TOPOLOGY }} \ @@ -202,7 +225,7 @@ steps: --kvm-build-id $(KVM_BUILD_ID) \ --kvm-image-branch "${{ parameters.KVM_IMAGE_BRANCH }}" \ --deploy-mg-extra-params="${{ parameters.DEPLOY_MG_EXTRA_PARAMS }}" \ - --common-extra-params="${{ parameters.COMMON_EXTRA_PARAMS }}" \ + --common-extra-params="${{ parameters.COMMON_EXTRA_PARAMS }} ${PTF_IMAGETAG}" \ --vm-type ${{ parameters.VM_TYPE }} --num-asic ${{ parameters.NUM_ASIC }} \ --image_url ${{ parameters.IMAGE_URL }} \ --upgrade-image-param="${{ parameters.UPGRADE_IMAGE_PARAM }}" \