Skip to content

Commit

Permalink
Add documentation to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Kelly committed Apr 26, 2017
1 parent 01e50d5 commit 8f5be81
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
============

Expand Down

0 comments on commit 8f5be81

Please sign in to comment.