X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjob-cost.sh;h=595b342e42bd975d743266f7339f994b9421e522;hb=b9eb4581940562effcf67863704a3ec2c47ceca0;hp=cb5f1a5977b3fd4dead49e07c153f04072d8a26e;hpb=254bbe5cc592a507ff9be80171786526ec9332e7;p=releng%2Fglobal-jjb.git 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