CirceCI

How to integrate Meterian with CircleCI pipeline

Adding Meterian to your CI pipeline is very simple, and it does not require much effort:

Simply add this 'job' into the circle.yml configuration file:

orbs:
docker: circleci/docker@0.5.20
jobs:
meterian:
machine: true
steps:
- checkout
- run: |
docker run --rm \
--volume ${PWD}:/workspace --env METERIAN_API_TOKEN=$METERIAN_API_TOKEN \
meterian/cli [Meterian CLI Options]

Then on the CircleCI dashboard, open your project and open your project' settings Here you will be able to set the METERIAN_API_TOKEN as environment variable.

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

CircleCI docker executor 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 CircleCI task will pass or it will fail.