@@ -65,21 +65,19 @@ def call(){
6565 ./venv/bin/uv run --group docs --no-dev sphinx-build docs/source build/docs/html -d build/docs/.doctrees -v -w logs/build_sphinx.log
6666 '''
6767 )
68+ publishHTML([allowMissing : false , alwaysLinkToLastBuild : false , keepAll : false , reportDir : ' build/docs/html' , reportFiles : ' index.html' , reportName : ' Documentation' , reportTitles : ' ' ])
69+ script{
70+ def props = readTOML( file : ' pyproject.toml' )[' project' ]
71+ def DOC_ZIP_FILENAME = " ${ props.name} -${ props.version} .doc.zip"
72+ zip archive : true , dir : ' build/docs/html' , glob : ' ' , zipFile : " dist/${ DOC_ZIP_FILENAME} "
73+ }
74+ stash includes : ' build/docs/html/**,dist/*.doc.zip' , name : ' DOCS_ARCHIVE'
6875 }
6976 post{
7077 always {
7178 recordIssues(tools : [sphinxBuild(name : ' Sphinx Documentation Build' , pattern : ' logs/build_sphinx.log' , id : ' sphinx_build' )])
7279 archiveArtifacts artifacts : ' logs/build_sphinx.log'
7380 }
74- success{
75- publishHTML([allowMissing : false , alwaysLinkToLastBuild : false , keepAll : false , reportDir : ' build/docs/html' , reportFiles : ' index.html' , reportName : ' Documentation' , reportTitles : ' ' ])
76- script{
77- def props = readTOML( file : ' pyproject.toml' )[' project' ]
78- def DOC_ZIP_FILENAME = " ${ props.name} -${ props.version} .doc.zip"
79- zip archive : true , dir : ' build/docs/html' , glob : ' ' , zipFile : " dist/${ DOC_ZIP_FILENAME} "
80- }
81- stash includes : ' build/docs/html/**,dist/*.doc.zip' , name : ' DOCS_ARCHIVE'
82- }
8381 failure{
8482 echo ' Failed to build Python package'
8583 }
@@ -225,24 +223,33 @@ def call(){
225223 steps{
226224 script{
227225 def envs = []
228- node(' docker && linux' ){
229- docker. image(' python' ). inside(' --mount source=python-tmp-packageValidation,target=/tmp' ){
226+ retry(2 ){
227+ node(' docker && linux' ){
228+ checkout scm
230229 try {
231- checkout scm
232- sh(script : ' python3 -m venv venv && venv/bin/pip install --disable-pip-version-check uv' )
233- envs = sh(
234- label : ' Get tox environments' ,
235- script : ' ./venv/bin/uv run --only-group tox --with tox-uv --isolated --quiet tox list -d --no-desc' ,
236- returnStdout : true ,
237- ). trim(). split(' \n ' )
238- } finally {
239- cleanWs(
240- patterns : [
241- [pattern : ' venv/' , type : ' INCLUDE' ],
242- [pattern : ' .tox' , type : ' INCLUDE' ],
243- [pattern : ' **/__pycache__/' , type : ' INCLUDE' ],
244- ]
245- )
230+ docker. image(' python' ). inside(' --mount source=python-tmp-packageValidation,target=/tmp' ){
231+ retry(2 ){
232+ try {
233+ sh(script : ' python3 -m venv venv && venv/bin/pip install --disable-pip-version-check uv' )
234+ envs = sh(
235+ label : ' Get tox environments' ,
236+ script : ' ./venv/bin/uv run --only-group tox --with tox-uv --isolated --quiet tox list -d --no-desc' ,
237+ returnStdout : true ,
238+ ). trim(). split(' \n ' )
239+ } catch (e){
240+ cleanWs(
241+ patterns : [
242+ [pattern : ' venv/' , type : ' INCLUDE' ],
243+ [pattern : ' .tox' , type : ' INCLUDE' ],
244+ [pattern : ' **/__pycache__/' , type : ' INCLUDE' ],
245+ ]
246+ )
247+ throw e
248+ }
249+ }
250+ }
251+ } finally {
252+ sh " ${ tool(name: 'Default', type: 'git')} clean -dfx"
246253 }
247254 }
248255 }
0 commit comments