X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Frtdv3.sh;h=08f98a2978dbee7d5fa05ed43f0699df11bf8983;hb=c8b9acd166fcbd88139a65f7721e522980a0e013;hp=7b4fef8b6659b7b928db61ed6c4279e898e92ba6;hpb=01a96e082d0f87e93cfe49157685a70a3e87bd04;p=releng%2Fglobal-jjb.git diff --git a/shell/rtdv3.sh b/shell/rtdv3.sh index 7b4fef8b..08f98a29 100644 --- a/shell/rtdv3.sh +++ b/shell/rtdv3.sh @@ -18,7 +18,7 @@ watchbuild(){ buildid=$(lftools rtd project-build-trigger "$rtdproject" "$1" | jq '.build.id') result=null - while [ $result == null ]; do + while [[ "$result" == null ]]; do sleep 10 result=$(lftools rtd project-build-details "$rtdproject" "$buildid" | jq '.success') echo "INFO Current result of running build $result" @@ -41,6 +41,15 @@ fi #MASTER_RTD_PROJECT as a global jenkins cnt masterproject="$umbrella-$MASTER_RTD_PROJECT" +#Exceptions needed for onap, due to importing their old docs. +if [[ $masterproject == "onap-doc" ]]; then + masterproject="onap" +fi +if [[ $rtdproject == "onap-doc" ]]; then + rtdproject="onap" +fi + + echo "INFO:" echo "INFO: Project: $PROJECT" echo "INFO: Read the Docs Sub Project: https://$rtdproject.readthedocs.io" @@ -130,8 +139,8 @@ echo "INFO: Performing merge action" branch=$(echo "$GERRIT_BRANCH" | tr '[:upper:]' '[:lower:]') echo "INFO: Checking if read the docs has seen branch $branch" - #if this is 404. then run discover branch - if ! lftools rtd project-version-details "$rtdproject" "$branch" | jq '.active'; then + #if this is 200 "null" Then run discover branch + if [[ $(lftools rtd project-version-details "$rtdproject" "$branch" | jq '.active') == "null" ]]; then echo "INFO: read the docs has not seen branch $branch for project $rtdproject" echo "INFO: triggering $rtdproject latest to instantiate new branch discovery" watchbuild latest