From 7ae9df62c4d08f733289e6f91a09ec31d2ce93d6 Mon Sep 17 00:00:00 2001 From: Henry Borchers Date: Fri, 17 Jan 2025 08:33:32 -0600 Subject: [PATCH 1/3] ci: Running tox stage on a mac clears the venv when creating it --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 70c0acd..4961c1d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -519,7 +519,7 @@ pipeline { ]){ try{ sh( label: 'Running Tox', - script: """python3 -m venv venv && ./venv/bin/pip install --disable-pip-version-check uv + script: """python3 -m venv venv --clear && ./venv/bin/pip install --disable-pip-version-check uv ./venv/bin/uvx -p ${version} --python-preference only-system --with tox-uv tox run -e ${toxEnv} -vvv """ ) From 684c37009c51ea21af8c9a3613f858a96dbea795 Mon Sep 17 00:00:00 2001 From: Henry Borchers Date: Fri, 17 Jan 2025 08:35:39 -0600 Subject: [PATCH 2/3] ci: Running tox stage on a mac runs git clean after --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4961c1d..add69b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -497,6 +497,7 @@ pipeline { returnStdout: true, ).trim().split('\n') } finally{ + sh "${tool(name: 'Default', type: 'git')} clean -dfx" cleanWs( patterns: [ [pattern: 'venv/', type: 'INCLUDE'], @@ -530,6 +531,7 @@ pipeline { ) throw e } finally{ + sh "${tool(name: 'Default', type: 'git')} clean -dfx" cleanWs( patterns: [ [pattern: 'venv/', type: 'INCLUDE'], From a1310ca12ec5f92eb8afa18c75dcbceea15ac0f0 Mon Sep 17 00:00:00 2001 From: Henry Borchers Date: Fri, 17 Jan 2025 08:36:19 -0600 Subject: [PATCH 3/3] ci: Running tox stage on a mac debugs uv packages only if uv got correctly installed --- Jenkinsfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index add69b2..97b2ff3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -525,10 +525,14 @@ pipeline { """ ) } catch(e) { - sh(script: '''. ./venv/bin/activate - uv python list - ''' - ) + script{ + if(fileExists( 'venv/bin/uv')){ + sh(script: '''. ./venv/bin/activate + uv python list + ''' + ) + } + } throw e } finally{ sh "${tool(name: 'Default', type: 'git')} clean -dfx"