diff --git a/README.rst b/README.rst index 34f1891..27bf12a 100644 --- a/README.rst +++ b/README.rst @@ -470,6 +470,53 @@ Here are the 5 steps to setup a Deployment dashboard in Buildbot Travis. ${stage} is the retrieved from the Deployment dashboard. ${version} is retrieved from the Deployment dashboard. +Configuring Travis Defaults +=========================== + +The YAML file or Python dict passed to ``TravisConfigurator`` supports a few keys to set some environment defaults. + +Default Matrix +-------------- +The ``default_matrix`` key contains the default values for any keys the repository's ``.travis.yml`` does not specify. + +Example:: + + default_matrix: + os: linux + dist: debian_7 + language: + python: 2.7 + c: + compiler: gcc + c++: + compiler: g++ + +This example sets the default ``os`` to ``linux``, the default ``dist`` to ``debian_7``, and sets default values for three languages. +If the ``.travis.yml`` has ``language: c``, then it will have ``compiler`` set to ``gcc``. + +Job Options +----------- +The ``job_options`` key supports adding properties to a build based on its values. +An example would be to use one image for Python projects and a different image for JavaScript projects. +The below example will set the ``image`` property to some UUID for a debian_7 build for C or Python. + +Example:: + + job_options: + linux: + debian_7: + c: + properties: + image: 7c6520af-7cf0-46a7-8e15-c30881dde467 + python: + properties: + image: bc654b68-4b55-4e1e-a0d2-29d21339600d + +The ``job_options`` key must follow a particular format. +The first level is the ``os``, the second level is the ``dist``, and the third level is the ``language``. +The value of the final level must be a dict. +If there is a ``properties`` key, all of the properties within that dict will be added to the build when it is triggered. + How it works ============