Code Review
/
releng
/
global-jjb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
(from parent 1:
8a26513
)
Merge "Typo jason -> json"
author
Anil Belur
<abelur@linuxfoundation.org>
Thu, 23 Jan 2020 00:17:46 +0000
(
00:17
+0000)
committer
Gerrit Code Review
<gerrit@linuxfoundation.org>
Thu, 23 Jan 2020 00:17:46 +0000
(
00:17
+0000)
shell/job-cost.sh
patch
|
blob
|
history
diff --git
a/shell/job-cost.sh
b/shell/job-cost.sh
index
6493a6e
..
5bd61be
100644
(file)
--- a/
shell/job-cost.sh
+++ b/
shell/job-cost.sh
@@
-47,10
+47,10
@@
instance_type=$(curl -s http://169.254.169.254/latest/meta-data/instance-type)
echo "INFO: Retrieving Pricing Info for: $instance_type"
url="https://pricing.vexxhost.net/v1/pricing/$instance_type/cost?seconds=$uptime"
-j
a
son_block=$(curl -s "$url")
+json_block=$(curl -s "$url")
-cost=$(jq .cost <<< "$j
a
son_block")
-resource=$(jq .resource <<< "$j
a
son_block" | tr -d '"')
+cost=$(jq .cost <<< "$json_block")
+resource=$(jq .resource <<< "$json_block" | tr -d '"')
# Archive the cost date
mkdir -p "$WORKSPACE/archives/cost"