From: Thanh Ha Date: Mon, 19 Mar 2018 19:30:08 +0000 (-0400) Subject: Quit build if submodule not found X-Git-Tag: v0.18.0~19^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=4d3e0b4e7bd54c19e1ebdbe4d79e8861ad158c70;p=releng%2Fglobal-jjb.git Quit build if submodule not found In the monolithic docs build we only care to build if the project is really a submodule of the monolithic docs build. If not then skip the build as the project should be providing their own docs verify job. Issue: RELENG-845 Change-Id: I9bc146170e150097b3b9a30ec0456173bba9b1ef Signed-off-by: Thanh Ha --- diff --git a/shell/rtd-verify.sh b/shell/rtd-verify.sh index 61c1974e..7f403ebb 100644 --- a/shell/rtd-verify.sh +++ b/shell/rtd-verify.sh @@ -16,6 +16,14 @@ 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