From 383a8a7fc4603740f39bdf3accc8dc6b3c10eb60 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Fri, 7 Aug 2026 14:20:43 +0200 Subject: [PATCH] Buildkite: install libyaml-perl when missing on PR agents Co-authored-by: Cursor --- .buildkite/scripts/build_pr.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.buildkite/scripts/build_pr.sh b/.buildkite/scripts/build_pr.sh index b50c37e8af85..6306b9e420e3 100755 --- a/.buildkite/scripts/build_pr.sh +++ b/.buildkite/scripts/build_pr.sh @@ -51,6 +51,15 @@ if [[ "${GITHUB_PR_BASE_REPO}" != 'docs' ]]; then exit 0 fi + # legacy_branches.pl needs YAML.pm on the host agent (not the Docker build + # image). Install it when missing so a stale docs-ubuntu image does not + # fail open and force a full clone/build for non-legacy branches. + if ! perl -MYAML -e1 >/dev/null 2>&1; then + echo "Perl YAML module missing on agent; installing libyaml-perl" + sudo apt-get update -qq + sudo apt-get install -y -qq libyaml-perl + fi + # Build only if conf.yaml lists the target branch as a legacy AsciiDoc branch # for this repo — otherwise skip but report success, since docs-build-pr is a # required check and we want it green rather than failing or left pending.