Extract Travis type of used VM for each job with API

Hi everyone,

I need to extract how much time the organisation I’m part of is using for each kind of VMs on Travis.
Ideally I want to be able to generate a report with: total time of MacOs build, total time of Ubuntu build, etc.
I tried to use the Job API, as I expected that this kind of information should be somehow visible in the job detail, but I wasn’t able to find the kind of information I’m looking for anywhere.

A possible way to achieve it is to go repo by repo on Github, parse the .travis.yml to fetch the type of required vm and then do a cross checking with the information I can extract from Travis itself. But, aside from being a very slow solution, this is clearly a workaround.

Do you know if Travis offer any kind of solution for this?

With API v2.1, you can get a build’s configuration: Travis CI - API V2 Reference

1 Like