From 4d3e0b4e7bd54c19e1ebdbe4d79e8861ad158c70 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Mon, 19 Mar 2018 15:30:08 -0400 Subject: [PATCH] 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 --- shell/rtd-verify.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.16.6