Skip to content

Latest commit

 

History

History
484 lines (278 loc) · 12.3 KB

REFERENCE.md

File metadata and controls

484 lines (278 loc) · 12.3 KB

Reference

Table of Contents

Classes

Public Classes

Private Classes

  • sonarqube::config: Configure SonarQube
  • sonarqube::install: Install SonarQube package
  • sonarqube::scanner::config: Configuration of SonarQube Scanner
  • sonarqube::scanner::install: Installation of SonarQube Scanner
  • sonarqube::service: Setup SonarQube service

Defined types

Classes

sonarqube

Install and configure SonarQube and additional components

Parameters

The following parameters are available in the sonarqube class:

arch

Data type: String[1]

Specifies the architecture of the installation archive that should be downloaded. Default: Automatically selected depending on the OS architecture.

ce_java_opts

Data type: Optional[String[1]]

Optional JVM options for the Compute Engine.

Default value: undef

ce_workercount

Data type: Optional[Integer]

The number of workers in the Compute Engine.

Default value: undef

config

Data type: Optional[String[1]]

Allow to specify an alternative SonarQube configuration, effectively replacing all contens of sonar.properies.

Default value: undef

context_path

Data type: String[1]

Specifies the context path for the application.

crowd

Data type: Hash

Specifies whether the Crowd plugin should be enabled. Default: false

download_dir

Data type: Stdlib::Absolutepath

The directory where the SonarQube installation archive should be stored.

download_url

Data type: String[1]

The URL from which the SonarQube installation archive should be downloaded.

edition

Data type: String[1]

Specifies the edition of SonarQube that should be installed. Default: community

group

Data type: String[1]

The group for the SonarQube application.

home

Data type: String[1]

SonarQube's data directory.

host

Data type: Optional[String[1]]

Specifies the listen address for SonarQube.

Default value: undef

http_proxy

Data type: Hash

Specifies the HTTP Proxy that should be used for SonarQube's Update Center or connection to devops platforms.

https

Data type: Hash

Specifies the required configuration to enable HTTPS support.

installroot

Data type: Stdlib::Absolutepath

Specifies the base directory where SonarQube should be installed. A new subdirectory for each version of SonarQube will be created.

jdbc

Data type: Hash

Specifies the database configuration for SonarQube.

ldap

Data type: Hash

Specifies the required configuration to enable LDAP authentication.

log_folder

Data type: Stdlib::Absolutepath

Specifies the log directory for SonarQube.

distribution_name

Data type: String[1]

Specifies the basename of the SonarQube archive.

pam

Data type: Hash

Specifies the required configuration to enable PAM authentication.

plugin_tmpdir

Data type: Stdlib::Absolutepath

Specifies the temporary download directory for plugin files. This defaults to /tmp. Changing it to something else would eleminate the need to download plugin files again after /tmp was purged.

port

Data type: Variant[Stdlib::Port, Integer[-1, 0]]

Specifies the TCP port for SonarQube.

portajp

Data type: Variant[Stdlib::Port, Integer[-1, 0]]

Specifies the port to use for the AJP communication protocol.

profile

Data type: Boolean

Specifies wether profiling should be enabled for SonarQube.

search_host

Data type: String[1]

Specifies the IP/hostname of the Elasticsearch server.

search_java_opts

Data type: Optional[String[1]]

Optional JVM options for the Elasticsearch server.

Default value: undef

search_port

Data type: Variant[Stdlib::Port, Integer[-1, 0]]

Specifies the TCP port of the Elasticsearch server.

service

Data type: String[1]

Specifies the name of the SonarQube system service.

sso

Data type: Optional[Hash]

Enable authentication using HTTP headers.

Default value: undef

manage_service

Data type: Boolean

If this module should create and mange the service configuration. Defaults to true

updatecenter

Data type: Boolean

Specifies whether to enable the Update Center.

pidfile

Data type: String[1]

Specifies the name of the PID file.

user

Data type: String[1]

The user for the SonarQube application.

user_system

Data type: Boolean

Specifies whether the SonarQube user should be a system user.

version

Data type: String[1]

Specifies the version of SonarQube that should be installed/updated. Expects a 4 digit version number (1.2.3.4), which can be found on the SonarQube download page.

web_java_opts

Data type: Optional[String[1]]

Optional JVM options for SonarQube's web server.

Default value: undef

search_java_additional_opts

Data type: Optional[String[1]]

Optional JVM options for embedded elasticsearch server.

Default value: undef

helper_dir

Data type: Stdlib::Absolutepath

Specifies the directory for Sonarqube Helper scripts.

system_passcode

Data type: Optional[String[1]]

Optional system_passcode setting for monitoring.

Default value: undef

sonarqube::scanner

Install and configure SonarQube Scanner

Parameters

The following parameters are available in the sonarqube::scanner class:

distribution_name

Data type: String[1]

Specifies the basename of the installation archive.

download_url

Data type: String[1]

The URL from which the installation archive should be downloaded.

installroot

Data type: Stdlib::Absolutepath

Specifies the base directory where it should be installed. A new subdirectory for each version will be created.

jdbc

Data type: Hash

Specifies the database configuration.

sonarqube_server

Data type: String[1]

The URL for the default SonarQube server.

version

Data type: String[1]

Specifies the version that should be installed/updated.

Defined types

sonarqube::move_to_home

Symlink a folder to SonarQube's installation directory

Parameters

The following parameters are available in the sonarqube::move_to_home defined type:

home

Data type: Stdlib::Absolutepath

SonarQube's data directory.

sonarqube::plugin

Manage SonarQube plugins: download, install, remove.

Parameters

The following parameters are available in the sonarqube::plugin defined type:

artifactid

Data type: String[1]

Namevar. Specifies the name of the plugin.

Default value: $name

ensure

Data type: Enum['present','absent']

Specifies the ensure state for the plugin. Default: present

Default value: present

ghid

Data type: Optional[String[1]]

Specifies a combination of a GitHub username and project name, for example myuser/sonar-exampleplugin. This is used to generate the download URL.

Default value: undef

groupid

Data type: String[1]

Specifies the groupid to use with maven.

Default value: 'org.codehaus.sonar-plugins'

legacy

Data type: Boolean

Install plugin using Maven. May not work with recent versions.

Default value: false

url

Data type: Optional[String[1]]

A direct download URL that points to the .jar file for the specified plugin. The filename must match the values of $name and $version, otherwise the cleanup script may malfunction.

Default value: undef

version

Data type: String[1]

Specifies the version of the plugin. This is also required to find and purge old plugin versions.