From 08e01ec0020c25109c43393db708e994f26558eb Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sun, 13 Feb 2022 10:17:17 -0500 Subject: [PATCH] Allow building Sphinx docs If docs/requirements.txt exists in the source tree, that means that we have Sphinx documentation, not Pandoc documentation, and we don't need to do the Pandoc-specific things to make HTML man pages. Also add some comments about the pending switch on the v5.0.x branch from Pandoc to Sphinx. When that happens, we can delete Pandoc-specific stuff from these scripts. Signed-off-by: Jeff Squyres --- jenkins/open-mpi-build-script.sh | 3 +++ jenkins/open-mpi.dist.create-tarball.groovy | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/jenkins/open-mpi-build-script.sh b/jenkins/open-mpi-build-script.sh index 555a762..5de4e9f 100755 --- a/jenkins/open-mpi-build-script.sh +++ b/jenkins/open-mpi-build-script.sh @@ -179,6 +179,9 @@ fi # ./configure --help. In prep for 5.0, we added a developer # requirement for pandoc to build (not required for dist tarballs), # with an explicit option to disable. +# JMS: The requirement will shortly change from pandoc to Sphinx. +# Keep pandoc for now; when Sphinx is brought to the v5.0.x branch, we +# can delete this whole Pandoc-specific if/else block. if `which pandoc > /dev/null 2>&1` ; then echo "--> Found pandoc. Allowing default manpage behavior" else diff --git a/jenkins/open-mpi.dist.create-tarball.groovy b/jenkins/open-mpi.dist.create-tarball.groovy index c1eeab2..56453cc 100644 --- a/jenkins/open-mpi.dist.create-tarball.groovy +++ b/jenkins/open-mpi.dist.create-tarball.groovy @@ -109,9 +109,25 @@ parallel ( node(manpage_builder) { stage('Build Man Pages') { checkout_code(); - sh "ls -lR . ; /bin/bash ompi-scripts/jenkins/open-mpi.dist.create-tarball.build-manpages.sh ${build_prefix} ${tarball} ${branch}" + // JMS As of 8 Mar 2022, Open MPI master has been converted + // away from Pandoc to Sphinx. The difference in the source + // tree is that master has a Python-style + // docs/requirements.txt file. Meaning: if we see that file, + // then we don't have Pandoc, and there's no extra step needed + // to build HTML man pages. + // + // Once the Sphinx stuff has been brought to v5.0.x, Pandoc + // will be fully gone, and this whole Pandoc-specific + // build-manpages.sh stuff can be deleted. + sh """ +if test ! -f docs/requirements.txt; then + ls -lR . ; /bin/bash ompi-scripts/jenkins/open-mpi.dist.create-tarball.build-manpages.sh ${build_prefix} ${tarball} ${branch} +fi +""" artifacts = sh(returnStdout:true, script:'cat ${WORKSPACE}/manpage-build-artifacts.txt').trim() - currentBuild.description="${currentBuild.description}Manpages: ${artifacts}
\n" + if (artifacts != "") { + currentBuild.description="${currentBuild.description}Manpages: ${artifacts}
\n" + } } } },