Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / shell / scrape-job-cost.sh
index 9bd5205..e940bc6 100755 (executable)
 #
 # Each cost file contains one or more CSV records in the following format:
 #
-#   JobName , BuildNumber , Date , InstanceType , Uptime , Cost1 , Cost2
+#   JobName , BuildNumber , Date , InstanceType , Uptime , Cost , StackCost
 #
 #   Date format: '%Y-%m-%d %H:%M:%S'
+#   Cost format: '%.2f' (1.29)
 #
 ##############################################################################
 #
@@ -43,8 +44,7 @@ $debug && echo "DEBUG Enabled"
 
 set -eufo pipefail
 
-function get-year-list()
-{
+get-year-list () {
     # Grab the years for each cost record use sort | uniq to get the
     # list of unique years found
     local list
@@ -74,7 +74,7 @@ cost_dir=~/cost
 # The Silo Directory for sandbox will get deleted periodically, so
 # gracefully handle that
 if [[ -d $silo_dir ]]; then
-   cd "$silo_dir"
+    cd "$silo_dir"
 else
     echo  "$(date +'%Y-%m-%d %H:%M') No Silo Directory, nothing to do"
     exit 0