From af6b90981af6daa1a73e29fc5c2c4764cff6f480 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Fri, 12 Jul 2024 16:06:40 -0700 Subject: [PATCH] Add Python version for Ubuntu and Fedora Signed-off-by: Abhijeet Kasurde --- .azure-pipelines/azure-pipelines.yml | 12 ++++++------ tests/utils/shippable/linux.sh | 11 ++++++++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index e1ad85f..5c6287b 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -107,12 +107,12 @@ stages: parameters: testFormat: devel/linux/{0}/1 targets: - - name: Fedora 39 - test: fedora39 - - name: Ubuntu 20.04 - test: ubuntu2004 - - name: Ubuntu 22.04 - test: ubuntu2204 + - name: Fedora 39 py311 + test: fedora39@3.11 + - name: Ubuntu 20.04 py39 + test: ubuntu2004@3.9 + - name: Ubuntu 22.04 py39 + test: ubuntu2204@3.9 - stage: Docker_2_17 displayName: Docker 2.17 dependsOn: [] diff --git a/tests/utils/shippable/linux.sh b/tests/utils/shippable/linux.sh index 9cc2f96..799e2a2 100755 --- a/tests/utils/shippable/linux.sh +++ b/tests/utils/shippable/linux.sh @@ -6,6 +6,15 @@ declare -a args IFS='/:' read -ra args <<< "$1" image="${args[1]}" +pyver=default +# check for explicit python version like 8.3@3.8 +declare -a splitversion +IFS='@' read -ra splitversion <<< "$image" + +if [ "${#splitversion[@]}" -gt 1 ]; then + image="${splitversion[0]}" + pyver="${splitversion[1]}" +fi if [ "${#args[@]}" -gt 2 ]; then target="shippable/posix/group${args[2]}/" @@ -15,4 +24,4 @@ fi # shellcheck disable=SC2086 ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \ - --docker "${image}" + --docker "${image}" --python "${pyver}"