Error: BUILD_RESULT: unbound variable
Change-Id: Iefbf3d6f658632990529015f35336cadb65e379c
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
fi
# Archive the cost date
fi
# Archive the cost date
-mkdir -p "$WORKSPACE/archives/cost"
+mkdir -p "${WORKSPACE}/archives/cost"
echo "INFO: Archiving Costs"
echo "INFO: Archiving Costs"
date=$(TZ=GMT date +'%Y-%m-%d %H:%M:%S')
# Format the uptime, cost & stack_cost fields
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,%s\n" "$JOB_NAME" "$BUILD_NUMBER" "$date" \
- "$resource" "$uptime" "$cost" "$stack_cost" "$BUILD_RESULT" > "$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"