Sentinel is a cli tool that facilitates testing, building and deploying of Vigour.io projects into Travis workflow. It also notifies about failed and success results on the following integrations:
- Slack ( just that for now :) )
- Sentinel runs
npm testscript and get it's exit code result to know how many tests have failed.
- If your
npm testscript executes any other third party tool, make sure that this returns the correct exit code. That way we can send the correct notification and travis can set the correct build result (passing or failing).
> 0 means failure; = 0 means success
- Sentinel will run
npm buildscript since the project is configured to do at
- Sentinel deploy distribution files to a specific github branch (
- Sentinel will unignore build files in
.gitignorefile that match
build.*pattern. It can be configure as an array on
Configuring your project
First, you need to know whether your repository is private or public because Travis has different URL locations for them.
- Access one of the URLs above
- Login with github, don't forget to give permissions to organization level
- Select your repository in your account settings inside Travis.
- Go to the repository settings in Travis and provide
SENTINEL_SLACK_WEBHOOKenvironment variable. IMPORTANT! this must be set as private/hidden/sensitive.
- create a
.travis.ymlfile with the following configuration:
language: node_js node_js: - "5.0.0" #all the versions you want to be tested branches: only: - master #all the branches that will trigger travis - develop - staging before_install: - npm install -g gaston #as we use gaston to test we need to install it beforehand - npm install -g vigour-sentinel #required script: - sentinel #required after_failure: - sentinel --notify-fail #required sudo: required services: - docker