File tree Expand file tree Collapse file tree 3 files changed +35
-11
lines changed
Expand file tree Collapse file tree 3 files changed +35
-11
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,23 @@ parameters:
44 default : ' utils'
55
66steps :
7+ # - bash: |
8+ # echo "Setting python tool cache path"
9+ # echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]:/agent/_work/_tool/Python/3.13.7/x64/lib/"
10+ # displayName: 'Set python tool cache path'
711 - bash : |
8- echo "Setting python tool cache path"
9- echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]:/agent/_work/_tool/Python/3.13.7/x64/lib/"
10- displayName: 'Set python tool cache path'
12+ 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)
15+ echo "Resolved latest python version: $PATCH"
16+ echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
17+ displayName: 'Query and set python tool cache path'
1118
1219
1320 - task : UsePythonVersion@0
1421 displayName : ' Use Python 3.13'
1522 inputs :
16- versionSpec : ' 3.13.7 '
23+ versionSpec : ' 3.13'
1724
1825 - bash : |
1926 tfenv use 0.14.6
Original file line number Diff line number Diff line change @@ -143,10 +143,18 @@ jobs:
143143 parameters :
144144 service_name : " ${{ parameters.service_name }}"
145145
146+ # - bash: |
147+ # echo "Setting python tool cache path"
148+ # echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]:/agent/_work/_tool/Python/${{ parameters.python_version }}/x64/lib/"
149+ # displayName: 'Set python tool cache path'
150+
146151 - bash : |
147- echo "Setting python tool cache path"
148- echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]:/agent/_work/_tool/Python/${{ parameters.python_version }}/x64/lib/"
149- displayName: 'Set python tool cache path'
152+ 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)
155+ echo "Resolved latest python version: $PATCH"
156+ echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
157+ displayName: 'Query and set python tool cache path'
150158
151159 - task : UsePythonVersion@0
152160 displayName : " Use Python ${{ parameters.python_version }}"
Original file line number Diff line number Diff line change @@ -29,15 +29,24 @@ jobs:
2929 workspace :
3030 clean : all
3131 steps :
32+ # - bash: |
33+ # echo "Setting python tool cache path"
34+ # echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]:/agent/_work/_tool/Python/3.13.7/x64/lib/"
35+ # displayName: 'Set python tool cache path'
36+
3237 - bash : |
33- echo "Setting python tool cache path"
34- echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]:/agent/_work/_tool/Python/3.13.7/x64/lib/"
35- displayName: 'Set python tool cache path'
38+ 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)
41+ echo "Resolved latest python version: $PATCH"
42+ echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
43+ displayName: 'Query and set python tool cache path'
44+
3645
3746 - task : UsePythonVersion@0
3847 displayName : ' Use Python 3.13'
3948 inputs :
40- versionSpec : 3.13.7
49+ versionSpec : 3.13
4150
4251 - bash : |
4352 instance_id="$(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
You can’t perform that action at this time.
0 commit comments