From: Aric Gardner Date: Thu, 9 Jul 2020 20:09:36 +0000 (-0400) Subject: Use double bracket conditional compound command X-Git-Tag: v0.55.2~4^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=b6e270851b4e1eca28b2fbef85598f40d1bed90e;hp=99e1a22608c6aa57ea78567683e98fcbcc9eb552;p=releng%2Fglobal-jjb.git Use double bracket conditional compound command Odd failures in the read the docs jobs casued by not quoting "$result" Im going to quote it and switch to double bracket. Fixed the issue in my testing. Errors seen were: jq: error (at :1): Cannot index string with string "success" ./script: line 11: [: ==: unary operator expected Signed-off-by: Aric Gardner Change-Id: Ic7554ddfa384b817ad3aac311972e6cfc52e0b49 --- diff --git a/releasenotes/notes/lf-rtdv3-jobs-809e51d2bf6794d8.yaml b/releasenotes/notes/lf-rtdv3-jobs-809e51d2bf6794d8.yaml new file mode 100644 index 00000000..3c887b55 --- /dev/null +++ b/releasenotes/notes/lf-rtdv3-jobs-809e51d2bf6794d8.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fix quoting bug in rtdv3.sh script that caused failures to exit improperly. diff --git a/shell/rtdv3.sh b/shell/rtdv3.sh index 23d373d1..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"