Merge "Fix: Sign artifacts on CentOS Stream 8/9"
[releng/global-jjb.git] / shell / job-cost.sh
index 4648a95..e5e1810 100644 (file)
@@ -25,8 +25,8 @@ fi
 # AWS job cost not supported, exit
 cloudtype="$(jq -r .v1.datasource /run/cloud-init/result.json)"
 if [[ $cloudtype == "DataSourceEc2Local" ]]; then
-  echo "INFO: Not able to calculate job cost on AWS"
-  exit 0
+    echo "INFO: Not able to calculate job cost on AWS"
+    exit 0
 fi
 
 lf-activate-venv zipp==1.1.0 python-openstackclient
@@ -85,5 +85,5 @@ echo "INFO: Archiving Costs"
 date=$(TZ=GMT date +'%Y-%m-%d %H:%M:%S')
 
 # Format the uptime, cost & stack_cost fields
-printf "%s,%s,%s,%s,%d,%.2f,%.2f\n" "$JOB_NAME" "$BUILD_NUMBER" "$date" \
-       "$resource" "$uptime" "$cost" "$stack_cost" > "$WORKSPACE/archives/cost.csv"
+printf "%s,%s,%s,%s,%d,%.2f,%.2f,%s\n" "$JOB_NAME" "$BUILD_NUMBER" "$date" \
+       "$resource" "$uptime" "$cost" "$stack_cost" "$BUILD_RESULT" > "$WORKSPACE/archives/cost.csv"