@@ -903,32 +903,34 @@ pipeline {
903903 [
904904 " Tox Environment: ${ toxEnv} " ,
905905 {
906- node(' docker && linux' ){
907- def maxRetries = 3
908- checkout scm
909- def image
910- lock(" ${ env.JOB_NAME} - ${ env.NODE_NAME} " ){
911- retry(maxRetries){
912- 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 CONAN_CENTER_PROXY_V2_URL .' )
906+ retry(2 ){
907+ node(' docker && linux' ){
908+ def maxRetries = 2
909+ checkout scm
910+ def image
911+ lock(" ${ env.JOB_NAME} - ${ env.NODE_NAME} " ){
912+ retry(maxRetries){
913+ 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 CONAN_CENTER_PROXY_V2_URL .' )
914+ }
913915 }
914- }
915- try {
916- retry(maxRetries) {
917- try {
918- withEnv([ " UV_CONFIG_FILE= ${ createUVConfig() } " ] ){
919- image . inside( ' --mount source=python-tmp-py3exiv2bind,target=/tmp ' ){
920- sh( label : ' Running Tox ' ,
921- script : " uv run --only-group tox -p ${ version } --python-preference only-system --with tox-uv tox run -e ${ toxEnv } --runner uv-venv-lock-runner -vvv "
922- )
916+ try {
917+ retry(maxRetries) {
918+ try {
919+ withEnv([ " UV_CONFIG_FILE= ${ createUVConfig() } " ]) {
920+ image . inside( ' --mount source=python-tmp-py3exiv2bind,target=/tmp ' ){
921+ sh( label : ' Running Tox ' ,
922+ script : " uv run --only-group tox -p ${ version } --python-preference only-system --with tox-uv tox run -e ${ toxEnv } --runner uv-venv-lock-runner -vvv "
923+ )
924+ }
923925 }
926+ } finally {
927+ sh " ${ tool(name: 'Default', type: 'git')} clean -dfx"
924928 }
925- } finally {
926- sh " ${ tool(name: 'Default', type: 'git')} clean -dfx"
927929 }
928- }
929- } finally {
930- if (image){
931- sh " docker rmi --force --no-prune ${ image.id } "
930+ } finally {
931+ if (image) {
932+ sh " docker rmi --force --no-prune ${ image.id } "
933+ }
932934 }
933935 }
934936 }
0 commit comments