- Lead Maintainer: Matthew O'Connor
- Sponsor: nearForm
A micro-service that provides Travis data for NodeZoo. This micro-service depends on the Travis and NPM registries but also caches retrieved data to reduce load on both public registries.
If you're using this microservice, and need help, you can:
- Post a github issue,
- Tweet to @nodezoo,
- Ask on the Gitter.
This micro-service can be ran as part of a complete system or as a single isolated unit.
A special system repository is available that runs the complete system using Docker and Fuge.
To make testing easier this micro-service can be ran in 'isolated' mode. This mode allows testing over http using a well defined port. Please note isolated mode means patterns are not exposed via mesh.
To run in isolated mode,
- Clone this repository locally,
- Run
npm install
, - Run
npm start isolated
,
Note: In memory storage is used over redis in isolated mode.
A simple http service is supported and can be called using Curl or other Rest client.
The default port is 8053
. It can be changed using the TRAVIS_PORT
environment
variable.
curl -d '{"role":"travis","cmd":"get","name":"hapi"}' http://localhost:8052/act
Various settings can be changed using environment variables, see the list below for all available variable names.
- The host to listen on in isolated mode.
- Defaults to
localhost
- The port to listen on in isolated mode.
- Defaults to
8051
.
- The host redis will listen on.
- Defaults to
localhost
- The port redis listen on.
- Defaults to
6379
.
- Starts isolated mode.
- Defaults to
false
.
- Change the npm registry used to validate the module name.
- Defaults to
http://registry.npmjs.org/
.
{
"entity$": "-/-/travis_cache",
"name": "seneca-web",
"url": "https://travis-ci.org/senecajs/seneca-web",
"buildId": "1398674",
"active": "true",
"buildState": "passed",
"lastBuilt": "2016-02-29T17:05:48Z",
"cached": "1460328882872",
"id": "seneca-web"
}
Returns Travis specific data for the module name provided.
seneca.act(`role:travis,cmd:get`, {name:'seneca'}, (err, data) => {})
An alias for role:travis,cmd:get
, allows integration into the wider nodezoo-system.
seneca.act(`role:info,req:part`, {name:'seneca'}, (err, reply) => {})
Called in response to a call to role:info,req:part
.
seneca.add(`role:info,res:part`, (msg, done) => {})
- name - Name of the module
- url - URL to the module on the Travis-CI website
- buildId - ID
- active - Whether the repository is active or not
- buildState - It's most recent build state
- lastBuilt - The time and date the module was last built at
- cached - The time the data was last cached at
The Nodezoo encourages open and safe participation.
If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.
Copyright (c) 2016, Matthew O'Connor and other contributors. Licensed under MIT.