diff --git a/Jenkinsfile_config_dir b/Jenkinsfile_config_dir index 4d6c88d..1720fde 100644 --- a/Jenkinsfile_config_dir +++ b/Jenkinsfile_config_dir @@ -45,8 +45,7 @@ pipeline { timeout(time: 1, unit: 'HOURS') { bat ''' call get_python.bat - call utils/jenkins_utils/hotfix_checker.bat - call \\\\isis.cclrc.ac.uk\\Shares\\ISIS_Experiment_Controls_Public\\ibex_utils\\installation_and_upgrade\\remove_genie_python.bat %LATEST_PYTHON_DIR% + python -u hotfix_checker.py ''' } } diff --git a/Jenkinsfile_epics_dir b/Jenkinsfile_epics_dir index e81bf13..e004f74 100644 --- a/Jenkinsfile_epics_dir +++ b/Jenkinsfile_epics_dir @@ -46,8 +46,7 @@ pipeline { timeout(time: 1, unit: 'HOURS') { bat ''' call get_python.bat - call utils/jenkins_utils/hotfix_checker.bat - call \\\\isis.cclrc.ac.uk\\Shares\\ISIS_Experiment_Controls_Public\\ibex_utils\\installation_and_upgrade\\remove_genie_python.bat %LATEST_PYTHON_DIR% + python -u hotfix_checker.py ''' } } diff --git a/get_python.bat b/get_python.bat index 9926112..4ef4eb8 100644 --- a/get_python.bat +++ b/get_python.bat @@ -1,3 +1,7 @@ -CALL \\isis.cclrc.ac.uk\Shares\ISIS_Experiment_Controls_Public\ibex_utils\installation_and_upgrade\define_latest_genie_python.bat %WORKSPACE:/=\% +CALL \\isis.cclrc.ac.uk\Shares\ISIS_Experiment_Controls_Public\ibex_utils\installation_and_upgrade\install_or_update_uv.bat -%LATEST_PYTHON3% -m pip install -r requirements.txt +set UV_TEMP_VENV=C:\Instrument\Var\tmp\.hotfixstatuscheckervenv +set UV_PYTHON=3.12 +uv venv "%UV_TEMP_VENV%" +call "%UV_TEMP_VENV%\scripts\activate" +uv pip install -r "%~dp0\requirements.txt" --no-build diff --git a/requirements.txt b/requirements.txt index e957084..0aa877b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -paramiko==3.4.0 -python-dotenv==1.0.1 +paramiko==3.5.1 +python-dotenv==1.1.1 Requests==2.32.3 +packaging==25.0 diff --git a/utils/jenkins_utils/hotfix_checker.bat b/utils/jenkins_utils/hotfix_checker.bat deleted file mode 100644 index fec6f5d..0000000 --- a/utils/jenkins_utils/hotfix_checker.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -setlocal - -REM Requires Python3 and python-ssh to be installed in C:\HotfixStatusChecker\Python3 on Jenkins agent -REM to setup run get_python.bat on the Jenkins agent - -REM Check if virtual environment directory exists, if not, create it -if not exist my_env ( - @echo Creating python virtual environemnt in my_env - %LATEST_PYTHON% -m venv my_env venv --system-site-packages -) - -REM Activate the virtual environment -call my_env\Scripts\activate.bat - -REM Install required packages -pip install -r requirements.txt - -REM Run the hotfix_checker script -python -u hotfix_checker.py - -REM Deactivate the virtual environment -deactivate -REM Check for errors and exit with the appropriate error level for Jenkins -exit /b %errorlevel% - - -@endlocal