File tree Expand file tree Collapse file tree 5 files changed +27
-8
lines changed
Expand file tree Collapse file tree 5 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 11# api-management-utils
22Scripts and utilities used across API managment platform and services
33
4+
5+ ################################################################################
6+ ########### Python upgrade to 3.13 ###########
7+ ########### Utils Repo has been updated to python 3.13 ###########
8+ ################################################################################
9+
10+ ########### We are continuing to support python 3.8/9(which are currently out of support) until January 26th 2026 ###########
11+ ########### After the deadline your pipelines will fail if you are using python version 3.8/9 ###########
12+
13+ Python upgrade related changes
14+ ###############################
15+ Projects using Python versions older than 3.13 and extending their pipeline with the utils repository must update their pipelines to ensure compatibility with the latest changes.
16+ For detailed guidance, please refer to the APIM FAQ page:
17+ https://nhsd-confluence.digital.nhs.uk/spaces/APM/pages/1226682275/Pipeline+Queries
18+
19+ Note: Projects running Python version 3.13 or later do not need any pipeline modifications.
20+
21+
22+
423## Scripts
524* ` template.py ` - cli for basic jinja templating
625* ` test_pull_request_deployments.py ` - cli for testing utils against other repositories
Original file line number Diff line number Diff line change 1010 # displayName: 'Set python tool cache path'
1111 - bash : |
1212 PATCH=$(curl -s https://api.github.com/repos/actions/python-versions/releases \
13- | jq -r '[.[] | .tag_name | select(startswith("3.13"))] | sort | last ' \
14- | cut -d- -f1)
13+ | jq -r '[.[] | .tag_name | select(startswith("3.13"))] | .[] ' \
14+ | sort -V | tail -n 1 | cut -d- -f1)
1515 echo "Resolved latest python version: $PATCH"
1616 echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
1717 displayName: 'Query and set python tool cache path'
Original file line number Diff line number Diff line change @@ -150,8 +150,8 @@ jobs:
150150
151151 - bash : |
152152 PATCH=$(curl -s https://api.github.com/repos/actions/python-versions/releases \
153- | jq -r '[.[] | .tag_name | select(startswith("${{ parameters.python_version }} "))] | sort | last ' \
154- | cut -d- -f1)
153+ | jq -r '[.[] | .tag_name | select(startswith("3.13 "))] | .[] ' \
154+ | sort -V | tail -n 1 | cut -d- -f1)
155155 echo "Resolved latest python version: $PATCH"
156156 echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
157157 displayName: 'Query and set python tool cache path'
Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ stages:
126126
127127 - bash : |
128128 PATCH=$(curl -s https://api.github.com/repos/actions/python-versions/releases \
129- | jq -r '[.[] | .tag_name | select(startswith("3.13"))] | sort | last ' \
130- | cut -d- -f1)
129+ | jq -r '[.[] | .tag_name | select(startswith("3.13"))] | .[] ' \
130+ | sort -V | tail -n 1 | cut -d- -f1)
131131 echo "Resolved latest python version: $PATCH"
132132 echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
133133 displayName: 'Query and set python tool cache path'
Original file line number Diff line number Diff line change 3636
3737 - bash : |
3838 PATCH=$(curl -s https://api.github.com/repos/actions/python-versions/releases \
39- | jq -r '[.[] | .tag_name | select(startswith("3.13"))] | sort | last ' \
40- | cut -d- -f1)
39+ | jq -r '[.[] | .tag_name | select(startswith("3.13"))] | .[] ' \
40+ | sort -V | tail -n 1 | cut -d- -f1)
4141 echo "Resolved latest python version: $PATCH"
4242 echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
4343 displayName: 'Query and set python tool cache path'
You can’t perform that action at this time.
0 commit comments