From 2f85e7a7dc482977d1bd93fd0f4c028d2af4e389 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Tue, 26 Mar 2024 18:20:09 +0200 Subject: [PATCH] Update chocolatey to latest version (#38617) This commit ensures that chocolatey is the latest version before installing Python on the Jenkins Windows workers. It fixes errors due to a outdated chocolatey versions looking like: ``` Failures - python (exited 1) - python not installed. An error occurred during installation: Unable to resolve dependency 'python3 (= 3.8.5)'. ``` (cherry picked from commit f87a5922620bea5afc9ebfc5f320871f7652f4cd) --- .ci/scripts/install-tools.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat index 8cb837553dc..86572356da9 100644 --- a/.ci/scripts/install-tools.bat +++ b/.ci/scripts/install-tools.bat @@ -14,6 +14,10 @@ curl --version >nul 2>&1 && ( REM Set the USERPROFILE to the previous location to fix issues with chocolatey in windows 2019 SET PREVIOUS_USERPROFILE=%USERPROFILE% SET USERPROFILE=%OLD_USERPROFILE% + +echo "Upgrade chocolatey to latest version" +choco upgrade chocolatey -y + IF NOT EXIST C:\Python38\python.exe ( REM Install python 3.8 choco install python -y -r --no-progress --version 3.8.5 || exit /b 1