Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for additional options for sonar.properties. Closes: #30 #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ The following parameters are available in the `sonarqube` class:
* [`search_java_additional_opts`](#-sonarqube--search_java_additional_opts)
* [`helper_dir`](#-sonarqube--helper_dir)
* [`system_passcode`](#-sonarqube--system_passcode)
* [`additional_opts`](#-sonarqube--additional_opts)

##### <a name="-sonarqube--arch"></a>`arch`

Expand Down Expand Up @@ -336,6 +337,14 @@ Optional system_passcode setting for monitoring.

Default value: `undef`

##### <a name="-sonarqube--additional_opts"></a>`additional_opts`

Data type: `Optional[Hash]`

Optional additional options to add to sonar.properties

Default value: `undef`

### <a name="sonarqube--runner"></a>`sonarqube::runner`

Install and configure SonarQube Runner
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@
# @param system_passcode
# Optional system_passcode setting for monitoring.
#
# @param additional_opts
# Optional additional options to add to sonar.properties
#
class sonarqube (
# required parameters
String $arch,
Expand Down Expand Up @@ -169,6 +172,7 @@
Optional[Hash] $sso = undef,
Optional[String] $web_java_opts = undef,
Optional[String] $system_passcode = undef,
Optional[Hash] $additional_opts = undef,
) {
Exec {
path => '/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin',
Expand Down
11 changes: 10 additions & 1 deletion templates/sonar.properties.epp
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,13 @@ crowd.application: <%= $sonarqube::crowd['application'] %>

# Crowd application password.
crowd.password: <%= $sonarqube::crowd['password'] %>
<% } %>
<% } -%>

<% if $sonarqube::additional_opts { %>
#-------------------
# Additional options
#-------------------
<% $sonarqube::additional_opts.each |$config, $value| { -%>
<%= $config %>=<%= $value %>
<% } -%>
<% } -%>