mozilla-treeherder
NodeJS interface for treeherder.
Usage
var Project = require('mozilla-treeherder/project');
var project = new Project('gaia', {
clientId: '...',
secret: '',
throttleRetries: 2
});
CLI
See all the options with:
./bin/treeherder --help
Reporting Treeherder bugs
treeherder api errors will
include a traceback from the server. Most times these errors are simply
something you did wrong (no hawk credentials, wrong parameters, etc...)
but there are times when there are actually bugs in treeherder... Submit
an issue with the traceback.
Tests
(you must run npm install first)
// run all the tests
npm test
// run one test
./node_modules/.bin/mocha path_to_test.js
Tests use nock so we can test some of our logic on CI without hitting
real servers but they are also designed to work with nock disabled... To
test against real servers do this:
// XXX: Testing this way is potentially buggy use at your own risk...
NOCK_OFF=true ./node_modules/.bin/mocha path_to_test
Notes
TREEHERDER_URL
environment variable can be used to configure the
base url for treeherder.