Uploaded image for project: 'IT: Release Engineering'
  1. IT: Release Engineering
  2. RELENG-1867

Get build cost estimate at end of jobs (Q3'19 target)

Issue XMLXMLWordPrintable

    • All / Cross Project

      Vexxhost provided a API for us to fetch cost estimates for the job run. We need to add this to global-jjb and deploy it to some projects.

      #!/bin/sh
      
      UPTIME=$(cat /proc/uptime | cut -d' ' -f1)
      INSTANCE_TYPE=$(curl -s http://169.254.169.254/latest/meta-data/instance-type)
      
      echo "Estimated job cost"
      curl -s https://pricing.vexxhost.net/v1/pricing/${INSTANCE_TYPE}/cost?seconds=${UPTIME%\.*} | python -mjson.tool
      

              tijohnson Tim Johnson
              zxiiro Thanh Ha
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: