Meterian
Search…
GitLab CI/CD
How to integrate with GitLab CICD pipelines

How to integrate Meterian with GitLab CI/CD

This step by step guide will help you integrate Meterian in your GitLab CI/CD pipelines.
Set the METERIAN_API_TOKEN environment variable
    From the menu select Setting > CI / CD
    “Expand” the Variables section
    Add new variable
    Check the “Mask variable” option
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.
Add Meterian to the pipeline
In your pipeline runner (find out here where to create one) paste this snippet:
1
meterian-analysis:
2
image: docker:stable
3
4
services:
5
- docker:18.09.7-dind
6
7
stage: test
8
9
script:
10
- ROOT=`pwd`
11
- docker pull --quiet meterian/cli
12
- METERIAN_CLI_OPT="[OPTIONS]"
13
- docker run --rm --volume $ROOT:/workspace --env METERIAN_API_TOKEN=$METERIAN_API_TOKEN meterian/cli $METERIAN_CLI_OPT
14
Copied!
Learn more about the Meterian Client here.
Some further examples are available:
Last modified 4d ago
Copy link