diff --git a/Jenkinsfile b/Jenkinsfile index d6b310b..17ee7f4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,9 +3,6 @@ library identifier: 'JenkinsPythonHelperLibrary@2024.2.0', retriever: modernSCM( remote: 'https://github.com/UIUCLibrary/JenkinsPythonHelperLibrary.git', ]) -//SUPPORTED_MAC_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12'] -//SUPPORTED_LINUX_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12'] -//SUPPORTED_WINDOWS_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12'] DEFAULT_AGENT_DOCKERFILE = 'ci/docker/python/linux/jenkins/Dockerfile' DEFAULT_AGENT_LABEL = 'linux && docker && x86' @@ -45,17 +42,28 @@ pipeline { stages{ stage('Building Sphinx Documentation'){ agent { - dockerfile { - filename DEFAULT_AGENT_DOCKERFILE - label DEFAULT_AGENT_LABEL - additionalBuildArgs DEFAULT_AGENT_DOCKER_BUILD_ARGS + docker{ + image 'python' + label 'docker && linux && x86_64' // needed for pysonar-scanner which is x86_64 only as of 0.2.0.520 + args '--mount source=python-tmp-packageValidation,target=/tmp' } } + environment{ + PIP_CACHE_DIR='/tmp/pipcache' + UV_INDEX_STRATEGY='unsafe-best-match' + UV_TOOL_DIR='/tmp/uvtools' + UV_PYTHON_INSTALL_DIR='/tmp/uvpython' + UV_CACHE_DIR='/tmp/uvcache' + } steps { sh ( label: "Building docs on ${env.NODE_NAME}", - script: '''mkdir -p logs - python -m sphinx docs/source build/docs/html -d build/docs/.doctrees -v -w logs/build_sphinx.log + script: '''python3 -m venv venv + venv/bin/pip install uv + trap "rm -rf venv" EXIT + . ./venv/bin/activate + mkdir -p logs + uvx --python 3.12 --from sphinx --with-editable . --with-requirements requirements-ci.txt sphinx-build docs/source build/docs/html -d build/docs/.doctrees -v -w logs/build_sphinx.log ''' ) } @@ -446,7 +454,7 @@ pipeline { docker { image 'python' label "${OS} && ${ARCHITECTURE} && docker" - args "--mount source=python-tmp-pyhathiprep,target=${['windows'].contains(OS) ? 'C:\\Users\\ContainerUser\\Documents': '/tmp'}" + args "--mount source=python-tmp-packageValidation,target=${['windows'].contains(OS) ? 'C:\\Users\\ContainerUser\\Documents': '/tmp'}" } } environment{