TiCS consists of two analyzers, TiCS Client and TICSQServer which can be used for specific purposes.
TICSQServer will create new measurement points in the database. TiCS Client creates temporary single shot measurements that are not stored in the database.
TiCS Client reads from the database to compute delta's against its own measurement.
In CI, TICSQServer is typically used to measure code bases on regular intervals on main branches.
TiCS Client is run on branches that originate from the main branch or on changes not yet pushed to main.
Both analyzers can apply quality gating to make sure the code base meets your quality requirements.
In order to use a TiCS analyzer, authentication might be required. Therefore a token associated with a specific role should be provided:
TiCS Analyzer | Role |
---|---|
TICSQServer | TiCS Analyzer |
TiCS Client | TiCS Client |
TIOBE provides CI plugins to ease the use of TiCS. The plugins expose the TiCS analysis and Quality Gating features. CI plugins can be obtained from the CI vendor's marketplace. The following CI tools are supported:
TICSQServer:
TiCS Client:
For specific details on a plugin, please refer to the corresponding CI plugin documentation, via the links above.
If you have a CI tool for which no TiCS plugin is available, it is still possible to integrate TiCS in your environment. To achieve this, you can follow the following recipe:
Especially for nodes or agents that are created on demand, it is required to install TiCS programmatically. To install TiCS, the "Install TICS Script" can be used. This script can be found in your TICS Viewer by first navigating to "Administration Pages" in the menu in the top bar and then clicking "Install TICS".
Supply the following command, updated with your applicable values:
MYPROJECT
-calc METRICS
-branchdir BRANCHDIR
MYPROJECT
-calc METRICS
ANALYSISSET
Where:
METRICS
denotes a comma-separated string of metrics, for instance: BEGIN,CS,CW,END
MYPROJECT
denotes the project nameBRANCHDIR
denotes a directory pointing to the root of your code baseANALYSISSET
denotes a source file, directory or file containing a filelist.See the command-line reference for all options of TICSQServer or TiCS Client.
Make sure that a quality gate is defined. To do this, please refer to the section Quality Gates.
Quality gates can be configured to apply to TICSQServer, TiCS Client or both.
Once a quality gate is defined for TICSQServer, it will be applied automatically.
You can inspect the outcome of the quality gate in the TiCS viewer after a TICSQServer analysis is complete.
To access the quality gate status programmatically, you can use the Quality Gate status API.
When a quality gate is defined for TiCS Client, -calc GATE
must be supplied as pseudo metric to the TICS command to activate the quality gating feature.
In this case all metrics, specified in the quality gate are run.
To make the analysis fail if your quality gates are not met, -exitsqa
must be supplied as argument as well.
See Running TICS with GATE for detailed information.