Merge "Refactor lf-c-cpp-jobs for common anchor"
authorEric Ball <eball@linuxfoundation.org>
Thu, 12 Mar 2020 15:08:40 +0000 (15:08 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Thu, 12 Mar 2020 15:08:40 +0000 (15:08 +0000)
releasenotes/notes/fix_costing_jq_test-0d6954b3384ea99d.yaml [new file with mode: 0644]
shell/job-cost.sh

diff --git a/releasenotes/notes/fix_costing_jq_test-0d6954b3384ea99d.yaml b/releasenotes/notes/fix_costing_jq_test-0d6954b3384ea99d.yaml
new file mode 100644 (file)
index 0000000..133b08b
--- /dev/null
@@ -0,0 +1,4 @@
+---
+fixes:
+  - |
+    Update jq validation of returned json blocks to work properly with jq v1.5.
index a7dceea..cb5f1a5 100644 (file)
@@ -59,7 +59,7 @@ url="https://pricing.vexxhost.net/v1/pricing/$instance_type/cost?seconds=$uptime
 json_block=$(curl -s "$url")
 
 # check if JSON returned and can be parsed
-if jq <<< "$json_block" > /dev/null 2>&1; then
+if jq <<< "$json_block" > /dev/null 2>&1; then
     cost=$(jq .cost <<< "$json_block")
     resource=$(jq .resource <<< "$json_block" | tr -d '"')
 else