Skip to content

Commit 303c3c8

Browse files
committed
ci: test packages first offline then online
1 parent 58e7890 commit 303c3c8

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

Jenkinsfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,17 @@ def get_sdist_linux(params, pythonVersions){
520520
retry(3){
521521
try{
522522
timeout(60){
523-
sh(label: 'Running Tox',
524-
script: """trap 'rm -rf .tox' EXIT
525-
uv run --only-group=tox-uv --python=${pythonVersion} --python-preference only-system tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')}
526-
"""
527-
)
523+
def attempt = 0
524+
retry(2){
525+
attempt += 1
526+
withEnv([(attempt == 1) ? "UV_OFFLINE=1" : 'UV_OFFLINE=0']){
527+
sh(label: "Running Tox: ${(attempt == 1) ? 'Offline' : 'Online'}",
528+
script: """trap 'rm -rf .tox' EXIT
529+
uv run --only-group=tox-uv --python=${pythonVersion} --python-preference only-system tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')}
530+
"""
531+
)
532+
}
533+
}
528534
}
529535
} catch(err){
530536
cleanWs(

0 commit comments

Comments
 (0)