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 <stdin>:1): Cannot index string with string "success"
./script: line 11: [: ==: unary operator expected
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: Ic7554ddfa384b817ad3aac311972e6cfc52e0b49
--- /dev/null
+---
+fixes:
+ - |
+ Fix quoting bug in rtdv3.sh script that caused failures to exit improperly.
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"