@@ -851,13 +851,15 @@ pipeline {
851851 node(' docker && linux' ){
852852 try {
853853 checkout scm
854- docker. image(' python' ). inside{
855- sh(script : ' python3 -m venv venv && venv/bin/pip install --disable-pip-version-check uv' )
856- envs = sh(
857- label : ' Get tox environments' ,
858- script : ' ./venv/bin/uvx --quiet --constraint requirements-dev.txt --with tox-uv tox list -d --no-desc' ,
859- returnStdout : true ,
860- ). trim(). split(' \n ' )
854+ timeout(10 ){
855+ docker. image(' python' ). inside{
856+ sh(script : ' python3 -m venv venv && venv/bin/pip install --disable-pip-version-check uv' )
857+ envs = sh(
858+ label : ' Get tox environments' ,
859+ script : ' ./venv/bin/uvx --quiet --constraint requirements-dev.txt --with tox-uv tox list -d --no-desc' ,
860+ returnStdout : true ,
861+ ). trim(). split(' \n ' )
862+ }
861863 }
862864 } finally {
863865 sh " ${ tool(name: 'Default', type: 'git')} clean -dfx"
@@ -873,24 +875,28 @@ pipeline {
873875 node(' docker && linux' ){
874876 def image
875877 checkout scm
876- lock(" ${ env.JOB_NAME} - ${ env.NODE_NAME} " ){
877- image = docker. build(UUID . randomUUID(). toString(), ' -f ci/docker/linux/tox/Dockerfile --build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL --build-arg UV_EXTRA_INDEX_URL --build-arg UV_INDEX_URL --build-arg PIP_DOWNLOAD_CACHE=/.cache/pip --build-arg UV_CACHE_DIR=/.cache/uv --build-arg CONAN_CENTER_PROXY_V1_URL .' )
878+ timeout(60 ){
879+ lock(" ${ env.JOB_NAME} - ${ env.NODE_NAME} " ){
880+ image = docker. build(UUID . randomUUID(). toString(), ' -f ci/docker/linux/tox/Dockerfile --build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL --build-arg UV_EXTRA_INDEX_URL --build-arg UV_INDEX_URL --build-arg PIP_DOWNLOAD_CACHE=/.cache/pip --build-arg UV_CACHE_DIR=/.cache/uv --build-arg CONAN_CENTER_PROXY_V1_URL .' )
881+ }
878882 }
879883 try {
880- image. inside{
881- try {
882- sh( label : ' Running Tox' ,
883- script : """ python3 -m venv /tmp/venv && /tmp/venv/bin/pip install --disable-pip-version-check uv
884- . /tmp/venv/bin/activate
885- uvx -p ${ version} --constraint requirements-dev.txt --with tox-uv tox run -e ${ toxEnv} -vvv
886- """
887- )
888- } catch (e) {
889- sh(script : ''' . ./venv/bin/activate
890- uv python list
891- '''
884+ timeout(30 ){
885+ image. inside{
886+ try {
887+ sh( label : ' Running Tox' ,
888+ script : """ python3 -m venv /tmp/venv && /tmp/venv/bin/pip install --disable-pip-version-check uv
889+ . /tmp/venv/bin/activate
890+ uvx -p ${ version} --constraint requirements-dev.txt --with tox-uv tox run -e ${ toxEnv} -vvv
891+ """
892892 )
893- throw e
893+ } catch (e) {
894+ sh(script : ''' . ./venv/bin/activate
895+ uv python list
896+ '''
897+ )
898+ throw e
899+ }
894900 }
895901 }
896902 } finally {
@@ -923,13 +929,15 @@ pipeline {
923929 node(' docker && windows' ){
924930 try {
925931 checkout scm
926- docker. image(env. DEFAULT_PYTHON_DOCKER_IMAGE ? env. DEFAULT_PYTHON_DOCKER_IMAGE : ' python' ). inside(" --mount source=${ SHARED_PIP_CACHE_VOLUME_NAME} ,target=${ env:PIP_CACHE_DIR} --mount source=uv_python_install_dir,target=${ env.UV_PYTHON_INSTALL_DIR} " ){
927- bat(script : ' python -m venv venv && venv\\ Scripts\\ pip install --disable-pip-version-check uv' )
928- envs = bat(
929- label : ' Get tox environments' ,
930- script : ' @.\\ venv\\ Scripts\\ uvx --quiet --constraint requirements-dev.txt --with tox-uv tox list -d --no-desc' ,
931- returnStdout : true ,
932- ). trim(). split(' \r\n ' )
932+ timeout(10 ){
933+ docker. image(env. DEFAULT_PYTHON_DOCKER_IMAGE ? env. DEFAULT_PYTHON_DOCKER_IMAGE : ' python' ). inside(" --mount source=${ SHARED_PIP_CACHE_VOLUME_NAME} ,target=${ env:PIP_CACHE_DIR} --mount source=uv_python_install_dir,target=${ env.UV_PYTHON_INSTALL_DIR} " ){
934+ bat(script : ' python -m venv venv && venv\\ Scripts\\ pip install --disable-pip-version-check uv' )
935+ envs = bat(
936+ label : ' Get tox environments' ,
937+ script : ' @.\\ venv\\ Scripts\\ uvx --quiet --constraint requirements-dev.txt --with tox-uv tox list -d --no-desc' ,
938+ returnStdout : true ,
939+ ). trim(). split(' \r\n ' )
940+ }
933941 }
934942 } finally {
935943 bat " ${ tool(name: 'Default', type: 'git')} clean -dfx"
@@ -945,18 +953,22 @@ pipeline {
945953 node(' docker && windows' ){
946954 def image
947955 checkout scm
948- lock(" ${ env.JOB_NAME} - ${ env.NODE_NAME} " ){
949- image = docker. build(UUID . randomUUID(). toString(), ' -f scripts/resources/windows/Dockerfile --build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL --build-arg CHOCOLATEY_SOURCE --build-arg chocolateyVersion --build-arg PIP_DOWNLOAD_CACHE=c:/users/ContainerUser/appdata/local/pip --build-arg UV_INDEX_URL --build-arg UV_EXTRA_INDEX_URL --build-arg UV_CACHE_DIR=c:/users/ContainerUser/appdata/local/uv' + (env. DEFAULT_DOCKER_DOTNET_SDK_BASE_IMAGE ? " --build-arg CONAN_CENTER_PROXY_V1_URL --build-arg FROM_IMAGE=${ env.DEFAULT_DOCKER_DOTNET_SDK_BASE_IMAGE} " : ' ' ) + ' .' )
956+ timeout(60 ){
957+ lock(" ${ env.JOB_NAME} - ${ env.NODE_NAME} " ){
958+ image = docker. build(UUID . randomUUID(). toString(), ' -f scripts/resources/windows/Dockerfile --build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL --build-arg CHOCOLATEY_SOURCE --build-arg chocolateyVersion --build-arg PIP_DOWNLOAD_CACHE=c:/users/ContainerUser/appdata/local/pip --build-arg UV_INDEX_URL --build-arg UV_EXTRA_INDEX_URL --build-arg UV_CACHE_DIR=c:/users/ContainerUser/appdata/local/uv' + (env. DEFAULT_DOCKER_DOTNET_SDK_BASE_IMAGE ? " --build-arg CONAN_CENTER_PROXY_V1_URL --build-arg FROM_IMAGE=${ env.DEFAULT_DOCKER_DOTNET_SDK_BASE_IMAGE} " : ' ' ) + ' .' )
959+ }
950960 }
951961 try {
952962 checkout scm
953963 try {
954- image. inside(" --mount source=${ SHARED_PIP_CACHE_VOLUME_NAME} ,target=${ env:PIP_CACHE_DIR} --mount source=uv_python_install_dir,target=${ env.UV_PYTHON_INSTALL_DIR} " ){
955- powershell(label : ' Running Tox' ,
956- script : """ uv python install cpython-${ version}
957- uvx -p ${ version} --constraint requirements-dev.txt --with tox-uv tox run -e ${ toxEnv}
958- """
959- )
964+ timeout(30 ){
965+ image. inside(" --mount source=${ SHARED_PIP_CACHE_VOLUME_NAME} ,target=${ env:PIP_CACHE_DIR} --mount source=uv_python_install_dir,target=${ env.UV_PYTHON_INSTALL_DIR} " ){
966+ powershell(label : ' Running Tox' ,
967+ script : """ uv python install cpython-${ version}
968+ uvx -p ${ version} --constraint requirements-dev.txt --with tox-uv tox run -e ${ toxEnv}
969+ """
970+ )
971+ }
960972 }
961973 } finally {
962974 bat " ${ tool(name: 'Default', type: 'git')} clean -dfx"
0 commit comments