The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

TICS Plugin

step([$class: 'TicsAnalyzer']): Run TICS

  • ticsPath
    The fully qualified directory where TICS is located, e.g. C:\Program Files (x86)\TIOBE\TICS\BuildServer. This directory should contain the TICSQServer and TICSMaintenance executables. You can leave this field empty if these executables can be found on the PATH environment variable of the Jenkins slave user.
    • Type: String
  • ticsConfiguration
    The directory of the TICS configuration that should be used, e.g. C:\Program Files (x86)\TIOBE\TICS\FileServer\cfg. The TICS configuration directory contains the SERVER.txt and PROJECTS.txt configuration files, among others. This setting sets the TICS environment variable before executing TICSQServer. You can leave this field empty if this variable is already set on the Jenkins slave.
    • Type: String
  • projectName
    The name of the project for which this run should be performed. This project should already exist in the TICS Configuration as you cannot create a new project using this plugin. You can create a new project by using the Build Configuration page of the Viewer or by using TICSMaintenance from the command line. Note that you can use Jenkins environment variables such as $JOB_NAME here.
    • Type: String
  • branchName
    The name of the branch for which the run should be performed. Although most projects only have one branch (named "trunk", "main", or "master"), you still need to specify the branch name here because more branches might be added later. To find out the branches of a project you can use the Build Configuration page of the TICS Viewer.
    • Type: String
  • branchDirectory
    The branch directory is the root directory of the source files for the branch. If this setting is provided, the branch directory will be updated prior to each TICSQServer run by invoking TICSMaintenance -branchdir. Note that you can use Jenkins variables (such as $WORKSPACE) here.
    • Type: String
  • environmentVariables
    A new-line separated list of environment variables that will be set before invoking TICSQServer. Some TICS modules and code checkers might need configuration using environment variables. Note that you can use environment variables such as $WORKSPACE here. Example:

    TICS_M2_OPTS=-s C:\Tools\apache-maven\conf\settings.xml
    TICS_COVERITY_URL=http://localhost:8080
    QACBIN=C:/QAC/common/bin
    PATH=C:\Tools\bin;$PATH
    

    • Type: String
  • createTmpdir
    • Type: boolean
  • tmpdir
    TICSQServer will create a directory named "ticstmpdir" in this directory. This tmpdir will contain log files useful for debugging problems encountered during the TICSQServer analysis. You can use Jenkins variables here. Example: C:/temp/$JOB_NAME.
    • Type: String
  • extraArguments
    Extra arguments to pass to the TICSQServer invocation.
    • Type: String
  • calc
    Check one or more metrics to have TICSQServer only calculate these metrics (for changed files). If nothing is checked, all metrics will be calculated.
      Nested Object
    • ABSTRACTINTERPRETATION
      • Type: boolean
    • ACCUCHANGERATE
      • Type: boolean
    • ACCUFIXRATE
      • Type: boolean
    • ACCULINESADDED
      • Type: boolean
    • ACCULINESCHANGED
      • Type: boolean
    • ACCULINESDELETED
      • Type: boolean
    • ALL
      • Type: boolean
    • AVGCYCLOMATICCOMPLEXITY
      • Type: boolean
    • BUILDRELATIONS
      • Type: boolean
    • CHANGEDFILES
      • Type: boolean
    • CHANGERATE
      • Type: boolean
    • CODINGSTANDARD
      • Type: boolean
    • COMPILERWARNING
      • Type: boolean
    • DEADCODE
      • Type: boolean
    • DUPLICATEDCODE
      • Type: boolean
    • ELOC
      • Type: boolean
    • FANOUT
      • Type: boolean
    • FINALIZE
      • Type: boolean
    • FIXRATE
      • Type: boolean
    • GLOC
      • Type: boolean
    • INCLUDERELATIONS
      • Type: boolean
    • INTEGRATIONTESTCOVERAGE
      • Type: boolean
    • LINESADDED
      • Type: boolean
    • LINESCHANGED
      • Type: boolean
    • LINESDELETED
      • Type: boolean
    • LOC
      • Type: boolean
    • MAXCYCLOMATICCOMPLEXITY
      • Type: boolean
    • PREPARE
      • Type: boolean
    • SECURITY
      • Type: boolean
    • SYSTEMTESTCOVERAGE
      • Type: boolean
    • TOTALTESTCOVERAGE
      • Type: boolean
    • UNITTESTCOVERAGE
      • Type: boolean
  • recalc
    Check one or more metrics to have TICSQServer recalculate these metrics, even for unchanged files. If nothing is checked, TICSQServer does not force recalculation of metrics for unchanged files.
      Nested Object
    • ABSTRACTINTERPRETATION
      • Type: boolean
    • ACCUCHANGERATE
      • Type: boolean
    • ACCUFIXRATE
      • Type: boolean
    • ACCULINESADDED
      • Type: boolean
    • ACCULINESCHANGED
      • Type: boolean
    • ACCULINESDELETED
      • Type: boolean
    • ALL
      • Type: boolean
    • AVGCYCLOMATICCOMPLEXITY
      • Type: boolean
    • BUILDRELATIONS
      • Type: boolean
    • CHANGEDFILES
      • Type: boolean
    • CHANGERATE
      • Type: boolean
    • CODINGSTANDARD
      • Type: boolean
    • COMPILERWARNING
      • Type: boolean
    • DEADCODE
      • Type: boolean
    • DUPLICATEDCODE
      • Type: boolean
    • ELOC
      • Type: boolean
    • FANOUT
      • Type: boolean
    • FINALIZE
      • Type: boolean
    • FIXRATE
      • Type: boolean
    • GLOC
      • Type: boolean
    • INCLUDERELATIONS
      • Type: boolean
    • INTEGRATIONTESTCOVERAGE
      • Type: boolean
    • LINESADDED
      • Type: boolean
    • LINESCHANGED
      • Type: boolean
    • LINESDELETED
      • Type: boolean
    • LOC
      • Type: boolean
    • MAXCYCLOMATICCOMPLEXITY
      • Type: boolean
    • PREPARE
      • Type: boolean
    • SECURITY
      • Type: boolean
    • SYSTEMTESTCOVERAGE
      • Type: boolean
    • TOTALTESTCOVERAGE
      • Type: boolean
    • UNITTESTCOVERAGE
      • Type: boolean

publishTicsResults:

  • viewerUrl
    • Type: String
  • branchName (optional)
    • Type: String
  • checkQualityGate (optional)
    • Type: boolean
  • failIfQualityGateFails (optional)
    • Type: boolean
  • projectName (optional)
    • Type: String
  • ticsProjectPath (optional)
    • Type: String
  • userId (optional)
    • Type: String
  • userName (optional)
    • Type: String

runTics:

  • projectName
    • Type: String
  • branchName
    • Type: String
  • branchDirectory (optional)
    • Type: String
  • calc (optional)
    • Type: Array / List of String
  • environmentVariables (optional)
    • Type: java.util.LinkedHashMap<java.lang.String, java.lang.String>
  • extraArguments (optional)
    • Type: String
  • recalc (optional)
    • Type: Array / List of String
  • ticsBin (optional)
    • Type: String
  • ticsConfiguration (optional)
    • Type: String
  • tmpdir (optional)
    • Type: String

step([$class: 'TicsPublisher']): Publish TICS results

  • viewerUrl
    URL where the TICS Viewer can be found, including the section name. Example: http://192.168.1.1:8080/tiobeweb/TICS. To determine this URL, open your TICS Viewer, and copy and paste the first part of the URL from your browser's address bar here. The URL should include the name of the section, which in this case is TICS.

    If you have configured this URL in the global settings, you can leave it empty here.
    • Type: String
  • ticsPath
    Fully qualified path to a branch. The path should be of the form HIE://PROJECT/BRANCH, where PROJECT should be substituted by the actual name of the project and BRANCH by the branch name for which you want to get the results. The name of the project and the name of the default branch can be found in the top part of the TIOBE Quality Indicator Label on the TQI Dashboard, when you select the project. Note that you can use the variable $JOB_NAME here.
    • Type: String
  • credentialsId
    • Type: String
  • checkQualityGate
    Enabling Quality Gate will perform the configured quality gate checks. If no quality gate is configured, no check will be performed. The configuration can be done in the Viewer through the Administration pages.
    • Type: boolean
  • failIfQualityGateFails
    • Type: boolean

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.