TravisCI

How to integrate Meterian with TravisCI pipeline

The integration with TravisCI is extremely simple.

After you've setup your account and synchronized it with your Github account simply add this to the .travis.yml configuration file:

services:
- docker
before_install:
- |
docker run --rm \
--volume ${PWD}:/workspace --env METERIAN_API_TOKEN=$METERIAN_API_TOKEN \
meterian/cli [Meterian CLI Options]

Then, on the TravisCI Dashboard, after you've selected the project, set the METERIAN_API_TOKEN as environment variable by clicking on More Options/Settings.

To retrieve a Meterian API Token visit the Meterian Dashboard; in your account select the tab "Tokens" and create a new one, or use an existing one.

API tokens are available only on paid account. To upgrade your subscription, please contact us.

Once the configuration has been committed and pushed on the repository, TravisCI will launch the 'meterian' job.

Learn more about the Meterian Client here.

How does it work

TravisCI docker will download and set the Meterian container, which contains the latest version of the Meterian client and the building tools for all the supported languages, then Meterian will be launched against the project.

Finally, given the result of the scan, the TravisCI task will pass or it will fail.