An unexpected behaviour has been spotted, when build-all-rst.sh failure was still resulting in publishdocs.sh successfull execution. As a result, .root-marker was not produced, so while promote job was successfull, it was not actually changing any content on AFS. Moreover, produced artifact was not containing all intended content, and was missing some guides, while it was treated as a successfull run[1], with logs stating the following: ``` 2025-06-29 23:15:43.683195 | ubuntu-jammy | build finished with problems, 1 warning (with warnings treated as errors). 2025-06-29 23:16:44.988836 | ubuntu-jammy | publishdocs: OK (66.94=setup[0.03]+cmd[64.81,2.10,0.00] seconds) 2025-06-29 23:16:44.988844 | ubuntu-jammy | congratulations :) (66.98 seconds) 2025-06-29 23:16:45.335764 | ubuntu-jammy | ok: Runtime: 0:01:07.091357 ``` While original issue was fixed in [2], we add `set` to both scripts to ensure that such false-positive behaviour would not occur in the future. [1] https://zuul.opendev.org/t/openstack/build/37a9b4537fc9495c99974bf011d09f00 [2] https://review.opendev.org/c/openstack/openstack-manuals/+/951429 Change-Id: I60654d07d3b8e731274c82351253463c10ea5f2b Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
49 lines
1.2 KiB
Bash
Executable File
49 lines
1.2 KiB
Bash
Executable File
#!/bin/bash -e
|
|
set -e -u -x
|
|
|
|
mkdir -p publish-docs/html
|
|
|
|
# Set this to a sensible value if not set by OpenStack CI.
|
|
if [ -z "$ZUUL_BRANCH" ] ; then
|
|
ZUUL_BRANCH="master"
|
|
fi
|
|
|
|
# This marker is needed for infra publishing.
|
|
# Note for stable branches, this needs to be the top of each manual.
|
|
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_BRANCH Build: $ZUUL_UUID Revision: $ZUUL_NEWREF"
|
|
|
|
LINKCHECK=""
|
|
PDF_OPTION=""
|
|
while [[ $# > 0 ]] ; do
|
|
option="$1"
|
|
case $option in
|
|
--linkcheck)
|
|
LINKCHECK="--linkcheck"
|
|
;;
|
|
--pdf)
|
|
PDF_OPTION="--pdf"
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
# PDF targets for Install guides are dealt in build-install-guides-rst.sh
|
|
PDF_TARGETS=( 'image-guide' \
|
|
'install-guide')
|
|
|
|
for guide in doc-contrib-guide glossary \
|
|
api-quick-start image-guide install-guide; do
|
|
if [[ ${PDF_TARGETS[*]} =~ $guide ]]; then
|
|
tools/build-rst.sh doc/$guide --build build \
|
|
--target $guide $LINKCHECK $PDF_OPTION
|
|
else
|
|
tools/build-rst.sh doc/$guide --build build \
|
|
--target $guide $LINKCHECK
|
|
fi
|
|
done
|
|
|
|
# For master, just mark the root
|
|
if [ "$ZUUL_BRANCH" = "master" ] ; then
|
|
echo $MARKER_TEXT > publish-docs/html/.root-marker
|
|
fi
|