X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Frtd-verify.sh;h=86254a10057a3fa4235c915261c5a6d4d79a701e;hb=32fc471adb587ff7ee252ebd1b1e6664119185ea;hp=61c1974e135fd9adf7d8ead4921e9a519e19ee2c;hpb=338c1a22f1e7eccd2224b1d9bc72cdd7ae55ebff;p=releng%2Fglobal-jjb.git diff --git a/shell/rtd-verify.sh b/shell/rtd-verify.sh index 61c1974e..86254a10 100644 --- a/shell/rtd-verify.sh +++ b/shell/rtd-verify.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -16,12 +16,25 @@ set -xe -o pipefail echo "---> Fetching project" if [ "$GERRIT_PROJECT" != "$PROJECT" ]; then + # Only test projects that are a submodule of docs + if ! git submodule | grep "$GERRIT_PROJECT"; then + echo "WARN: Project is not a submodule of docs. This likely means " \ + "the project is not participating in the monolithic docs build " \ + "and should have their own verify job. Quitting job run..." + exit 0 + fi + cd "docs/submodules/$GERRIT_PROJECT" fi git fetch origin "$GERRIT_REFSPEC" && git checkout FETCH_HEAD git submodule update +if [[ $JOB_NAME == "lf-infra-lftools-rtd-verify-any" ]]; then + # Install patchset lftools + python3 -m pip install --user -e . +fi + echo "---> Generating docs" cd "$WORKSPACE" tox -edocs