From: Aric Gardner Date: Mon, 18 Nov 2019 14:59:28 +0000 (-0500) Subject: Trigger latest each time. X-Git-Tag: v0.49.0~30 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=794042ce858f009db24afb1b6d62bb2c33584c24;p=releng%2Fglobal-jjb.git Trigger latest each time. Trigger "latest" and "branch" By default rtd serves documentation at /latest/ When a buid was triggered via curl, using a the old method. "generic api integration" curl -X POST -d "branches=${GERRIT_BRANCH}" -d "token=$RTD_TOKEN" "$RTD_BUILD_URL this returned for example: {"build_triggered":true,"project":"o-ran-sc-doc","versions": ["latest","master"]} So the previous behavior was to build latest and master from a call with branches=master when we post via the v3 api. lftools rtd project-build-trigger "$rtdproject" "$STREAM" It actually respects the $STREAM variable and only builds "master" This is not what we want, we want latest to be updated as well. so we need to trigger both builds. It is possible to, after project creation "enable master branch" and then "delete default branch" so that /latest/ ceases to exist. but having /latest/ is the default behavior is seems best to not fight against it, to simplify initial project setup. The best solution I see right now is to just always trigger latest as well as the branch we want to build. Signed-off-by: Aric Gardner Change-Id: I6e2062aa30383ee79a1d64d8f5327ef9a05cece6 --- diff --git a/shell/rtdv3.sh b/shell/rtdv3.sh index c1014f46..3246767f 100644 --- a/shell/rtdv3.sh +++ b/shell/rtdv3.sh @@ -85,5 +85,7 @@ echo "INFO: Running merge job" fi fi + # api v3 method does not update latest whith stream. lftools rtd project-build-trigger "$rtdproject" "$STREAM" + lftools rtd project-build-trigger "$rtdproject" latest fi