From: Andrew Grimberg Date: Thu, 20 Aug 2020 19:57:49 +0000 (+0000) Subject: Merge "Fix job cost amazon exception" X-Git-Tag: v0.57.0~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=f925caeb41f5db6640744b3cf30fd0ad0ea5af0b;hp=8af06d1a238b4d3b3191bcca043e2271696fb9f3;p=releng%2Fglobal-jjb.git Merge "Fix job cost amazon exception" --- diff --git a/shell/job-cost.sh b/shell/job-cost.sh index cb5f1a59..595b342e 100644 --- a/shell/job-cost.sh +++ b/shell/job-cost.sh @@ -16,7 +16,8 @@ set -euf -o pipefail source ~/lf-env.sh # AWS job cost not supported, exit -if grep -qi amazon /sys/devices/virtual/dmi/id/bios_vendor ; then +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 fi