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 simply go to the Meterian Dashboard, select the tab "Tokens" and create a new one, or use an existing one.

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

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.