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:
image: docker:stable
- docker:18.09.7-dind
stage: test
- ROOT=`pwd`
- docker pull --quiet meterian/cli
- docker run --rm --volume $ROOT:/workspace --env METERIAN_API_TOKEN=$METERIAN_API_TOKEN meterian/cli $METERIAN_CLI_OPT
Learn more about the Meterian Client here.
Some further examples are available: