Is there a machine-friendly way to get a list of the available dist and osx_image values?

Hi,
I’d like to automate the process of updating the dist and osx_image values of my builds.
Is there any place where I can fetch the available entries, possibly sorted by novelty?
That is, besides scraping the Travis documentation pages, which is rather fragile.

Thanks

https://github.com/travis-ci/docs-travis-ci-com/blob/master/_data/xcodes.yml is the contents of the OSX images table in https://docs.travis-ci.com/user/reference/osx/.

There’s no such data file for dist: in the docs (the only places where there full list can currently be found is https://github.com/travis-ci/docs-travis-ci-com/blob/master/user/reference/linux.md and https://github.com/travis-ci/docs-travis-ci-com/blob/master/_includes/enterprise_sidebar.html (in a more parseable form)).

However, https://github.com/travis-ci/travis-yml/blob/master/lib/travis/yml/schema/def/dist.rb has the list of values accepted by the config validator (i.e. it doesn’t contain undocumented values if there are any).

Which of those sources would you say is the more reliable?

Namely, the one that:

  1. Is more likely to be up to date
  2. Is less likely to get moved or changed in such a way that a trivial parser (e.g. a regex) will break

This JSON schema is used by the config validator, and should be most authoritative.

1 Like

The schema doesn’t have a list of osx_image: values.

Imprint