Configuration Variables

Coverity on Polaris

Version
latest
Inside a Coverity on Polaris configuration file, variables can be used instead of literal values to refer to information from a source code management solution or environment variables.

Variables in a configuration file have the following form.

${type.variable}

Table 1. Project directory
Name Description
${project.projectDir} This is the project directory. All other paths are relative to this location.
Table 2. Environment variables
Name Description
${env.ENVIRONMENT_VARIABLE} The value of the specified environment variable is retrieved. In this example, the value of ENVIRONMENT_VARIABLE is used in the configuration file. Environment variables can not be substituted for properties in the project section.
Table 3. Git variables
Name Description
${scm.git.branch} or ${scm.git.branch(dir)} This returns the branch name for the project or a specific subdirectory.
${scm.git.commit} or ${scm.git.commit(dir)} This returns the current commit for the project or a specific subdirectory.
${scm.git.commit.date} or ${scm.git.commit.date(dir)} This returns the current commit date for the project or a specific subdirectory.
${scm.git.modified} or ${scm.git.modified(dir)} This returns either true or false, indicating whether the repository has changed since the last commit, for the project or a specific subdirectory.
${scm.git.origin} or ${scm.git.origin(dir)} This returns the Git origin for the project or a specific subdirectory.
${scm.git.repo} or ${scm.git.repo(dir)} This returns the current repository name for the project or a specific subdirectory.
Table 4. Subversion variables
Name Description
${scm.svn.branch} or ${scm.svn.branch(dir)} This returns the current branch for the project or a specific subdirectory.
${scm.svn.modified} or ${scm.svn.modified(dir)} This returns either true or false, indicating whether the repository has changed since the last commit, for the project or a specific subdirectory.
${scm.svn.repo} or ${scm.svn.repo(dir)} This returns the current repository name for the project or a specific subdirectory.
${scm.svn.revision} or ${scm.svn.revision(dir)} This returns the current revision for the project or a specific subdirectory.
${scm.svn.revision.date} or ${scm.svn.revision.date(dir)} This returns the current revision date for the project or a specific subdirectory.
${scm.svn.root} or ${scm.svn.root(dir)} This returns the URI of the Subversion repository. Example: https://example.com/svn-repos
${scm.svn.url} or ${scm.svn.url(dir)} This returns the Subversion URI for the project or a specific subdirectory. Example: https://example.com/svn-repos/BusinessGroup1/ProjectA