TeamCity
Last updated
Last updated
In this section we will see the steps to integrate Meterian with TeamCity.
Create your project, linked to your repository and make sure the correct building agents are installed.
Now select your project form the list and click on "Edit configuration"
The first thing to do is set METERIAN_API_TOKEN as environment variable
Select 'Paramenters' on the menu and Add new parameter
Here select 'Environment variable' from the dropdown menu, type env.METERIAN_API_TOKEN as Name and finally set the API token as value.
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.
Now select Build Step: Command Line from the menu, Add build step and then from the dropdown menu select "Command line" as Runner type.
Here fill all the field as displayed in the image
Make sure the Docker image name is meterian/cli
, the selected platform is Linux and the Custom script is java -jar /meterian-cli.jar [Meterian CLI Options]
Learn more about the Meterian Client here.
TeamCity 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 TeamCity build will pass or it will fail.