-
Notifications
You must be signed in to change notification settings - Fork 1k
[docker-ptf]: Choose PTF image based on branch #14362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
d0d9b7e
c17b018
a81b809
04ef042
2e81c5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,6 +192,24 @@ steps: | |
|
|
||
| rm -f new_test_plan_id.txt | ||
|
|
||
| # all feature branches branched out from master can use py3only image | ||
| parent_commit=$(git rev-parse HEAD^1) | ||
| master_commit=$(git rev-parse master) | ||
| branch_from_master=0 | ||
| if [ "$parent_commit" == "$master_commit" ] | ||
| then | ||
| branch_from_master=1 | ||
| fi | ||
|
|
||
| if [ "${{ parameters.MGMT_BRANCH }}" == "master" ] || [ $branch_from_master -eq 1 ] | ||
| then | ||
| PTF_IMAGETAG="--ptf_imagetag=py3only" | ||
| else | ||
| PTF_IMAGETAG="--ptf_imagetag=internal" | ||
| fi | ||
| common_extra_params="${{ parameters.COMMON_EXTRA_PARAMS }} $PTF_IMAGETAG" | ||
| echo "##vso[task.setvariable variable=COMMON_EXTRA_PARAMS;]$common_extra_params" | ||
|
||
|
|
||
| python ./.azure-pipelines/test_plan.py create \ | ||
| -t ${{ parameters.TOPOLOGY }} \ | ||
| -o new_test_plan_id.txt \ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compare the commit id doesn't make sense to me. Once a branch like 202411 branched out from master in the future, and certainly it could use py3only image, but compare commit id would cause branch_from_master=0 and use internal image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. Thanks. I will probably use a list of known branches that use mixed and the rest can use py3only.