X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjob-cost.sh;h=595b342e42bd975d743266f7339f994b9421e522;hb=89a3197c179eae7b3d8fba46ba2aa74367895eb0;hp=cb5f1a5977b3fd4dead49e07c153f04072d8a26e;hpb=1c99557ff1b60356f85193d00e23020bb9e53467;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