Skip to content

Commit b060ca4

Browse files
committed
ci: Building Sphinx Documentation stashes inside steps
1 parent 2dc53c5 commit b060ca4

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

vars/runJenkinsPipeline.groovy

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

0 commit comments

Comments
 (0)