diff --git a/.gitignore b/.gitignore index cb02e22..7975cbd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -logs/ .idea +.metals +.vscode *.jar *.orig -.metals +logs diff --git a/README.md b/README.md index 2f7d333..823fa91 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ # sonar-scala-docker [![GitHub version]()](https://github.com/mwz/sonarqube-scala-docker/releases) -[![GitHub version lts]()](https://github.com/mwz/sonarqube-scala-docker/releases) +[![GitHub version lts]()](https://github.com/mwz/sonarqube-scala-docker/releases) +[![GitHub version lts 7.9]()](https://github.com/mwz/sonarqube-scala-docker/releases) [![GitHub version lts 6.7]()](https://github.com/mwz/sonarqube-scala-docker/releases) [![Docker Pulls](https://img.shields.io/docker/pulls/mwizner/sonarqube-scala-plugins.svg)](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) Docker images and docker-compose recipes for out-of-the-box -[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts), +[SonarQube 8.7.1](https://www.sonarqube.org), +[SonarQube 8.9 LTS](https://www.sonarqube.org/sonarqube-8-9-lts), [SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and -[SonarQube 8.7.1](https://www.sonarqube.org) instance with support -for [Scala](http://www.scala-lang.org), +[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) instance with +support for [Scala](http://www.scala-lang.org), [Scoverage](https://github.com/scoverage/scalac-scoverage-plugin) (code coverage metrics) and [Scalastyle](http://www.scalastyle.org) + [Scapegoat](https://github.com/sksamuel/scapegoat) (static code analysis). @@ -37,10 +39,12 @@ You can also use a standalone docker image which contains SonarQube server with bundled sonar-scala plugin, [`mwizner/sonarqube-scala-plugins:5.7.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)(or `mwizner/sonarqube-scala-plugins:latest-full`) and -[`mwizner/sonarqube-scala-plugins:4.2.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) +[`mwizner/sonarqube-scala-plugins:5.8.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) (or `mwizner/sonarqube-scala-plugins:latest-lts-full`) for the current LTS -version. Alternatively, we also provide an image for the old SonarQube 6.7 LTS +version. Alternatively, we also provide an image for the old SonarQube 7.9 LTS version - +[`mwizner/sonarqube-scala-plugins:4.2.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) +and SonarQube 6.7 LTS version - [`mwizner/sonarqube-scala-plugins:2.12.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) To start the container issue the following command: @@ -71,9 +75,10 @@ docker run -d \ ## Dependencies -- [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) / - [SonarQube 7.9 LTS](https://hub.docker.com/_/sonarqube) / - [SonarQube 8.7.1](https://hub.docker.com/_/sonarqube) +- [SonarQube 8.7.1](https://hub.docker.com/_/sonarqube) or + [SonarQube 8.9 LTS](https://hub.docker.com/_/sonarqube) or + [SonarQube 7.9 LTS](https://hub.docker.com/_/sonarqube) or + [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) - [PostgreSQL 12](https://hub.docker.com/_/postgres) - [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle, scoverage and scapegoat @@ -88,7 +93,8 @@ scapegoat support)_ |Version | SonarQube | sonar-scala | |--------|-----------|-------------| [5.7.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.7.0) | 8.7.1 [documentation](https://docs.sonarqube.org/8.7), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16540) | [8.7.0](https://github.com/mwz/sonar-scala/releases/tag/v8.7.0) -[4.2.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/4.2.0) | 7.9.1 LTS [documentation](https://docs.sonarqube.org/7.9), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15029) | [7.9.0](https://github.com/mwz/sonar-scala/releases/tag/v7.9.0) +[5.8.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.8.0) | 8.9.4 LTS [documentation](https://docs.sonarqube.org/8.9), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=17027) | [8.9.0](https://github.com/mwz/sonar-scala/releases/tag/v8.9.0) +[4.2.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/4.2.0) | 7.9.1 LTS [documentation](https://docs.sonarqube.org/7.9), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15029) | [8.9.0](https://github.com/mwz/sonar-scala/releases/tag/v7.9.0) [2.12.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.12.0) | 6.7.7 LTS [documentation](https://docs.sonarqube.org/display/SONARQUBE67/Documentation), [changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14865) | [6.8.0](https://github.com/mwz/sonar-scala/releases/tag/v6.8.0) @@ -197,6 +203,12 @@ scapegoat support)_ 7.0.0 + + 4.2.0 + 7.9.1 LTS documentation, changelog + 7.9.0 + + 4.1.0 7.9.1 LTS documentation, changelog @@ -209,12 +221,6 @@ scapegoat support)_ 7.7.0 - - 2.12.0 - 6.7.7 LTS documentation, changelog - 6.8.0 - - 2.11.0 6.7.6 LTS documentation, changelog @@ -305,6 +311,7 @@ way to automate analysis of Scala projects with SonarQube.
Expand to see the changelog.
    +
  • 5.8.0 - Upgraded sonar-scala to 8.9.0 & SonarQube to 8.9.4.
  • 5.7.0 - Upgraded sonar-scala to 8.7.0 & SonarQube to 8.7.1.
  • 5.6.0 - Upgraded sonar-scala to 8.6.0 & SonarQube to 8.5.1.
  • 5.5.0 - Upgraded sonar-scala to 8.5.0 & SonarQube to 8.4.
  • diff --git a/README.tpl.md b/README.tpl.md index 3d88f23..1a54b6b 100644 --- a/README.tpl.md +++ b/README.tpl.md @@ -1,15 +1,17 @@ # sonar-scala-docker [![GitHub version]()](https://github.com/mwz/sonarqube-scala-docker/releases) -[![GitHub version lts]()](https://github.com/mwz/sonarqube-scala-docker/releases) +[![GitHub version lts]()](https://github.com/mwz/sonarqube-scala-docker/releases) +[![GitHub version lts 7.9]()](https://github.com/mwz/sonarqube-scala-docker/releases) [![GitHub version lts 6.7]()](https://github.com/mwz/sonarqube-scala-docker/releases) [![Docker Pulls](https://img.shields.io/docker/pulls/mwizner/sonarqube-scala-plugins.svg)](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) Docker images and docker-compose recipes for out-of-the-box -[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts), +[SonarQube {{current.sonar}}](https://www.sonarqube.org), +[SonarQube 8.9 LTS](https://www.sonarqube.org/sonarqube-8-9-lts), [SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and -[SonarQube {{current.sonar}}](https://www.sonarqube.org) instance with support -for [Scala](http://www.scala-lang.org), +[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) instance with +support for [Scala](http://www.scala-lang.org), [Scoverage](https://github.com/scoverage/scalac-scoverage-plugin) (code coverage metrics) and [Scalastyle](http://www.scalastyle.org) + [Scapegoat](https://github.com/sksamuel/scapegoat) (static code analysis). @@ -39,8 +41,10 @@ bundled sonar-scala plugin, `mwizner/sonarqube-scala-plugins:latest-full`) and [`mwizner/sonarqube-scala-plugins:{{lts.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) (or `mwizner/sonarqube-scala-plugins:latest-lts-full`) for the current LTS -version. Alternatively, we also provide an image for the old SonarQube 6.7 LTS +version. Alternatively, we also provide an image for the old SonarQube 7.9 LTS version - +[`mwizner/sonarqube-scala-plugins:{{lts79.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) +and SonarQube 6.7 LTS version - [`mwizner/sonarqube-scala-plugins:{{lts67.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) To start the container issue the following command: @@ -71,9 +75,10 @@ docker run -d \ ## Dependencies -- [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) / - [SonarQube 7.9 LTS](https://hub.docker.com/_/sonarqube) / - [SonarQube {{current.sonar}}](https://hub.docker.com/_/sonarqube) +- [SonarQube {{current.sonar}}](https://hub.docker.com/_/sonarqube) or + [SonarQube 8.9 LTS](https://hub.docker.com/_/sonarqube) or + [SonarQube 7.9 LTS](https://hub.docker.com/_/sonarqube) or + [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) - [PostgreSQL 12](https://hub.docker.com/_/postgres) - [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle, scoverage and scapegoat @@ -89,6 +94,7 @@ scapegoat support)_ |--------|-----------|-------------| [{{current.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{current.version}}) | {{current.sonar}} [documentation]({{{current.sonarDocs}}}), [changelog]({{{current.sonarChangelog}}}) | [{{current.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{current.sonarScala}}) [{{lts.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{lts.version}}) | {{lts.sonar}} [documentation]({{{lts.sonarDocs}}}), [changelog]({{{lts.sonarChangelog}}}) | [{{lts.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{lts.sonarScala}}) +[{{lts79.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{lts79.version}}) | {{lts79.sonar}} [documentation]({{{lts79.sonarDocs}}}), [changelog]({{{lts79.sonarChangelog}}}) | [{{lts.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{lts79.sonarScala}}) [{{lts67.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{lts67.version}}) | {{lts67.sonar}} [documentation]({{{lts67.sonarDocs}}}), [changelog]({{{lts67.sonarChangelog}}}) | [{{lts67.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{lts67.sonarScala}}) @@ -135,6 +141,7 @@ way to automate analysis of Scala projects with SonarQube.
    Expand to see the changelog.
      +
    • 5.8.0 - Upgraded sonar-scala to 8.9.0 & SonarQube to 8.9.4.
    • 5.7.0 - Upgraded sonar-scala to 8.7.0 & SonarQube to 8.7.1.
    • 5.6.0 - Upgraded sonar-scala to 8.6.0 & SonarQube to 8.5.1.
    • 5.5.0 - Upgraded sonar-scala to 8.5.0 & SonarQube to 8.4.
    • diff --git a/README_DOCKERHUB.md b/README_DOCKERHUB.md index 4f5ea4c..299205c 100644 --- a/README_DOCKERHUB.md +++ b/README_DOCKERHUB.md @@ -1,8 +1,9 @@ Docker images with out-of-the-box -[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts), +[SonarQube 8.7.1](https://www.sonarqube.org), +[SonarQube 8.9 LTS](https://www.sonarqube.org/sonarqube-8-9-lts), [SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and -[SonarQube 8.7.1](https://www.sonarqube.org) instance with support -for **[Scala](http://www.scala-lang.org)**, +[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) instance with +support for **[Scala](http://www.scala-lang.org)**, **[Scoverage](https://github.com/scoverage/scalac-scoverage-plugin)** (code coverage metrics) and **[Scalastyle](http://www.scalastyle.org)** + **[Scapegoat](https://github.com/sksamuel/scapegoat)** (static code analysis). @@ -23,6 +24,11 @@ sonar-scala provides Scapegoat support from version `6.5.0` onwards. `5.7.0-full`, `latest-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.7.0-full/Dockerfile), [Release 5.7.0](https://github.com/mwz/sonar-scala-docker/releases/tag/5.7.0) +- `5.8.0`, `latest-lts` (8.9 LTS) + [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.8.0/Dockerfile), + `5.8.0-full`, `latest-lts-full` (8.9 LTS) + [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.8.0-full/Dockerfile), + [Release 5.8.0](https://github.com/mwz/sonar-scala-docker/releases/tag/5.8.0) - `4.2.0`, `latest-lts` (7.9 LTS) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/4.2.0/Dockerfile), `4.2.0-full`, `latest-lts-full` (7.9 LTS) @@ -43,8 +49,10 @@ For older versions please check the | ------------------------ | ----------------- | ---------------------- | | 5.7.0 | | 8.7.0 | | 5.7.0-full | 8.7.1 | 8.7.0 | -| 4.2.0 | | 7.9.0 | -| 4.2.0-full | 7.9.1 LTS | 7.9.0 | +| 5.8.0 | | 8.9.0 | +| 5.8.0-full | 8.9.4 LTS | 8.9.0 | +| 4.2.0 | | 7.9.0 | +| 4.2.0-full | 7.9.1 LTS | 7.9.0 | | 2.12.0 | | 6.8.0 | | 2.12.0-full | 6.7.7 LTS | 6.8.0 | diff --git a/README_DOCKERHUB.tpl.md b/README_DOCKERHUB.tpl.md index f97f0d6..2017935 100644 --- a/README_DOCKERHUB.tpl.md +++ b/README_DOCKERHUB.tpl.md @@ -1,8 +1,9 @@ Docker images with out-of-the-box -[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts), +[SonarQube {{current.sonar}}](https://www.sonarqube.org), +[SonarQube 8.9 LTS](https://www.sonarqube.org/sonarqube-8-9-lts), [SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and -[SonarQube {{current.sonar}}](https://www.sonarqube.org) instance with support -for **[Scala](http://www.scala-lang.org)**, +[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) instance with +support for **[Scala](http://www.scala-lang.org)**, **[Scoverage](https://github.com/scoverage/scalac-scoverage-plugin)** (code coverage metrics) and **[Scalastyle](http://www.scalastyle.org)** + **[Scapegoat](https://github.com/sksamuel/scapegoat)** (static code analysis). @@ -23,11 +24,16 @@ sonar-scala provides Scapegoat support from version `6.5.0` onwards. `{{current.version}}-full`, `latest-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/{{current.version}}-full/Dockerfile), [Release {{current.version}}](https://github.com/mwz/sonar-scala-docker/releases/tag/{{current.version}}) -- `{{lts.version}}`, `latest-lts` (7.9 LTS) +- `{{lts.version}}`, `latest-lts` (8.9 LTS) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/{{lts.version}}/Dockerfile), - `{{lts.version}}-full`, `latest-lts-full` (7.9 LTS) + `{{lts.version}}-full`, `latest-lts-full` (8.9 LTS) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/{{lts.version}}-full/Dockerfile), [Release {{lts.version}}](https://github.com/mwz/sonar-scala-docker/releases/tag/{{lts.version}}) +- `{{lts79.version}}`, `latest-lts` (7.9 LTS) + [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/{{lts79.version}}/Dockerfile), + `{{lts79.version}}-full`, `latest-lts-full` (7.9 LTS) + [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/{{lts79.version}}-full/Dockerfile), + [Release {{lts79.version}}](https://github.com/mwz/sonar-scala-docker/releases/tag/{{lts79.version}}) - `{{lts67.version}}` (6.7 LTS) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/{{lts67.version}}/Dockerfile), `{{lts67.version}}-full` (6.7 LTS) @@ -45,6 +51,8 @@ For older versions please check the | {{current.version}}-full | {{current.sonar}} | {{current.sonarScala}} | | {{lts.version}} | | {{lts.sonarScala}} | | {{lts.version}}-full | {{lts.sonar}} | {{lts.sonarScala}} | +| {{lts79.version}} | | {{lts79.sonarScala}} | +| {{lts79.version}}-full | {{lts79.sonar}} | {{lts79.sonarScala}} | | {{lts67.version}} | | {{lts67.sonarScala}} | | {{lts67.version}}-full | {{lts67.sonar}} | {{lts67.sonarScala}} | diff --git a/conf/sonar-lts.properties b/conf/sonar-lts.properties index ae1d9e9..6a79dde 100644 --- a/conf/sonar-lts.properties +++ b/conf/sonar-lts.properties @@ -1,406 +1,407 @@ -# Property values can: -# - reference an environment variable, for example sonar.jdbc.url= ${env:SONAR_JDBC_URL} -# - be encrypted. See https://redirect.sonarsource.com/doc/settings-encryption.html - -#-------------------------------------------------------------------------------------------------- -# DATABASE -# -# IMPORTANT: -# - The embedded H2 database is used by default. It is recommended for tests but not for -# production use. Supported databases are Oracle, PostgreSQL and Microsoft SQLServer. -# - Changes to database connection URL (sonar.jdbc.url) can affect SonarSource licensed products. - -# User credentials. -# Permissions to create tables, indices and triggers must be granted to JDBC user. -# The schema must be created first. -#sonar.jdbc.username= -#sonar.jdbc.password= - -#----- Embedded Database (default) -# H2 embedded database server listening port, defaults to 9092 -#sonar.embeddedDatabase.port=9092 - -#----- Oracle 11g/12c/18c/19c -# The Oracle JDBC driver must be copied into the directory extensions/jdbc-driver/oracle/. -# Only the thin client is supported, and we recommend using the latest Oracle JDBC driver. See -# https://jira.sonarsource.com/browse/SONAR-9758 for more details. -# If you need to set the schema, please refer to http://jira.sonarsource.com/browse/SONAR-5000 -#sonar.jdbc.url=jdbc:oracle:thin:@localhost:1521/XE - -#----- PostgreSQL 9.3 or greater -# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema". -#sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=my_schema - -#----- Microsoft SQLServer 2014/2016/2017 and SQL Azure -# A database named sonar must exist and its collation must be case-sensitive (CS) and accent-sensitive (AS) -# Use the following connection string if you want to use integrated security with Microsoft Sql Server -# Do not set sonar.jdbc.username or sonar.jdbc.password property if you are using Integrated Security -# For Integrated Security to work, you have to download the Microsoft SQL JDBC driver package from -# https://www.microsoft.com/en-us/download/details.aspx?id=55539 -# and copy sqljdbc_auth.dll to your path. You have to copy the 32 bit or 64 bit version of the dll -# depending upon the architecture of your server machine. -#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true - -# Use the following connection string if you want to use SQL Auth while connecting to MS Sql Server. -# Set the sonar.jdbc.username and sonar.jdbc.password appropriately. -#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar - -#----- Connection pool settings -# The maximum number of active connections that can be allocated -# at the same time, or negative for no limit. -# The recommended value is 1.2 * max sizes of HTTP pools. For example if HTTP ports are -# enabled with default sizes (50, see property sonar.web.http.maxThreads) -# then sonar.jdbc.maxActive should be 1.2 * 50 = 60. -#sonar.jdbc.maxActive=60 - -# The maximum number of connections that can remain idle in the -# pool, without extra ones being released, or negative for no limit. -#sonar.jdbc.maxIdle=5 - -# The minimum number of connections that can remain idle in the pool, -# without extra ones being created, or zero to create none. -#sonar.jdbc.minIdle=2 - -# The maximum number of milliseconds that the pool will wait (when there -# are no available connections) for a connection to be returned before -# throwing an exception, or <= 0 to wait indefinitely. -#sonar.jdbc.maxWait=5000 - -#sonar.jdbc.minEvictableIdleTimeMillis=600000 -#sonar.jdbc.timeBetweenEvictionRunsMillis=30000 - -#-------------------------------------------------------------------------------------------------- -# WEB SERVER -# Web server is executed in a dedicated Java process. By default heap size is 512MB. -# Use the following property to customize JVM options. -# Recommendations: -# -# The HotSpot Server VM is recommended. The property -server should be added if server mode -# is not enabled by default on your environment: -# http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html -# -# Startup can be long if entropy source is short of entropy. Adding -# -Djava.security.egd=file:/dev/./urandom is an option to resolve the problem. -# See https://wiki.apache.org/tomcat/HowTo/FasterStartUp#Entropy_Source -# -#sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError - -# Same as previous property, but allows to not repeat all other settings like -Xmx -#sonar.web.javaAdditionalOpts= - -# Binding IP address. For servers with more than one IP address, this property specifies which -# address will be used for listening on the specified ports. -# By default, ports will be used on all IP addresses associated with the server. -#sonar.web.host=0.0.0.0 - -# Web context. When set, it must start with forward slash (for example /sonarqube). -# The default value is root context (empty value). -#sonar.web.context= -# TCP port for incoming HTTP connections. Default value is 9000. -#sonar.web.port=9000 - -# The maximum number of connections that the server will accept and process at any given time. -# When this number has been reached, the server will not accept any more connections until -# the number of connections falls below this value. The operating system may still accept connections -# based on the sonar.web.connections.acceptCount property. The default value is 50. -#sonar.web.http.maxThreads=50 - -# The minimum number of threads always kept running. The default value is 5. -#sonar.web.http.minThreads=5 - -# The maximum queue length for incoming connection requests when all possible request processing -# threads are in use. Any requests received when the queue is full will be refused. -# The default value is 25. -#sonar.web.http.acceptCount=25 - -# By default users are logged out and sessions closed when server is restarted. -# If you prefer keeping user sessions open, a secret should be defined. Value is -# HS256 key encoded with base64. It must be unique for each installation of SonarQube. -# Example of command-line: -# echo -n "type_what_you_want" | openssl dgst -sha256 -hmac "key" -binary | base64 -#sonar.auth.jwtBase64Hs256Secret= - -# The inactivity timeout duration of user sessions, in minutes. After the configured -# period of time, the user is logged out. -# The default value is set to 3 days (4320 minutes) -# and cannot be greater than 3 months. Value must be strictly positive. -#sonar.web.sessionTimeoutInMinutes=4320 - -# A passcode can be defined to access some web services from monitoring -# tools without having to use the credentials of a system administrator. -# Check the Web API documentation to know which web services are supporting this authentication mode. -# The passcode should be provided in HTTP requests with the header "X-Sonar-Passcode". -# By default feature is disabled. -#sonar.web.systemPasscode= - -#-------------------------------------------------------------------------------------------------- -# SSO AUTHENTICATION - -# Enable authentication using HTTP headers -#sonar.web.sso.enable=false - -# Name of the header to get the user login. -# Only alphanumeric, '.' and '@' characters are allowed -#sonar.web.sso.loginHeader=X-Forwarded-Login - -# Name of the header to get the user name -#sonar.web.sso.nameHeader=X-Forwarded-Name - -# Name of the header to get the user email (optional) -#sonar.web.sso.emailHeader=X-Forwarded-Email - -# Name of the header to get the list of user groups, separated by comma (optional). -# If the sonar.sso.groupsHeader is set, the user will belong to those groups if groups exist in SonarQube. -# If none of the provided groups exists in SonarQube, the user will only belong to the default group. -# Note that the default group will always be set. -#sonar.web.sso.groupsHeader=X-Forwarded-Groups - -# Interval used to know when to refresh name, email and groups. -# During this interval, if for instance the name of the user is changed in the header, it will only be updated after X minutes. -#sonar.web.sso.refreshIntervalInMinutes=5 - -#-------------------------------------------------------------------------------------------------- -# LDAP CONFIGURATION - -# Enable the LDAP feature -# sonar.security.realm=LDAP - -# Set to true when connecting to a LDAP server using a case-insensitive setup. -# sonar.authenticator.downcase=true - -# URL of the LDAP server. Note that if you are using ldaps, then you should install the server certificate into the Java truststore. -# ldap.url=ldap://localhost:10389 - -# Bind DN is the username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory (optional) -# ldap.bindDn=cn=sonar,ou=users,o=mycompany - -# Bind Password is the password of the user to connect with. Leave this blank for anonymous access to the LDAP directory (optional) -# ldap.bindPassword=secret - -# Possible values: simple | CRAM-MD5 | DIGEST-MD5 | GSSAPI See http://java.sun.com/products/jndi/tutorial/ldap/security/auth.html (default: simple) -# ldap.authentication=simple - -# See : -# * http://java.sun.com/products/jndi/tutorial/ldap/security/digest.html -# * http://java.sun.com/products/jndi/tutorial/ldap/security/crammd5.html -# (optional) -# ldap.realm=example.org - -# Context factory class (optional) -# ldap.contextFactoryClass=com.sun.jndi.ldap.LdapCtxFactory - -# Enable usage of StartTLS (default : false) -# ldap.StartTLS=true - -# Follow or not referrals. See http://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html (default: true) -# ldap.followReferrals=false - -# USER MAPPING - -# Distinguished Name (DN) of the root node in LDAP from which to search for users (mandatory) -# ldap.user.baseDn=cn=users,dc=example,dc=org - -# LDAP user request. (default: (&(objectClass=inetOrgPerson)(uid={login})) ) -# ldap.user.request=(&(objectClass=user)(sAMAccountName={login})) - -# Attribute in LDAP defining the user’s real name. (default: cn) -# ldap.user.realNameAttribute=name - -# Attribute in LDAP defining the user’s email. (default: mail) -# ldap.user.emailAttribute=email - -# GROUP MAPPING - -# Distinguished Name (DN) of the root node in LDAP from which to search for groups. (optional, default: empty) -# ldap.group.baseDn=cn=groups,dc=example,dc=org - -# LDAP group request (default: (&(objectClass=groupOfUniqueNames)(uniqueMember={dn})) ) -# ldap.group.request=(&(objectClass=group)(member={dn})) - -# Property used to specifiy the attribute to be used for returning the list of user groups in the compatibility mode. (default: cn) -# ldap.group.idAttribute=sAMAccountName - -#-------------------------------------------------------------------------------------------------- -# COMPUTE ENGINE -# The Compute Engine is responsible for processing background tasks. -# Compute Engine is executed in a dedicated Java process. Default heap size is 512MB. -# Use the following property to customize JVM options. -# Recommendations: -# -# The HotSpot Server VM is recommended. The property -server should be added if server mode -# is not enabled by default on your environment: -# http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html -# -#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError - -# Same as previous property, but allows to not repeat all other settings like -Xmx -#sonar.ce.javaAdditionalOpts= - -#-------------------------------------------------------------------------------------------------- -# ELASTICSEARCH -# Elasticsearch is used to facilitate fast and accurate information retrieval. -# It is executed in a dedicated Java process. Default heap size is 512MB. -# -# -------------------------------------------------- -# Word of caution for Linux users on 64bits systems -# -------------------------------------------------- -# Please ensure Virtual Memory on your system is correctly configured for Elasticsearch to run properly -# (see https://www.elastic.co/guide/en/elasticsearch/reference/5.5/vm-max-map-count.html for details). -# -# When SonarQube runs standalone, a warning such as the following may appear in logs/es.log: -# "max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]" -# When SonarQube runs as a cluster, however, Elasticsearch will refuse to start. -# - -# JVM options of Elasticsearch process -#sonar.search.javaOpts=-Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError - -# Same as previous property, but allows to not repeat all other settings like -Xmx -#sonar.search.javaAdditionalOpts= - -# Elasticsearch port. Default is 9001. Use 0 to get a free port. -# As a security precaution, should be blocked by a firewall and not exposed to the Internet. -#sonar.search.port=9001 - -# Elasticsearch host. The search server will bind this address and the search client will connect to it. -# Default is loopback address. -# As a security precaution, should NOT be set to a publicly available address. -#sonar.search.host= - -#-------------------------------------------------------------------------------------------------- -# UPDATE CENTER - -# Update Center requires an internet connection to request https://update.sonarsource.org -# It is enabled by default. -#sonar.updatecenter.activate=true - -# HTTP proxy (default none) -#http.proxyHost= -#http.proxyPort= -# HTTPS proxy (defaults are values of http.proxyHost and http.proxyPort) -#https.proxyHost= -#https.proxyPort= - -# NT domain name if NTLM proxy is used -#http.auth.ntlm.domain= - -# SOCKS proxy (default none) -#socksProxyHost= -#socksProxyPort= - -# Proxy authentication (used for HTTP, HTTPS and SOCKS proxies) -#http.proxyUser= -#http.proxyPassword= - -# Proxy exceptions: list of hosts that can be accessed without going through the proxy -# separated by the '|' character, wildcard character '*' can be used for pattern matching -# used for HTTP and HTTPS (default none) -# (note: localhost and its literal notations (127.0.0.1, ...) are always excluded) -#http.nonProxyHosts= - -#-------------------------------------------------------------------------------------------------- -# LOGGING - -# SonarQube produces logs in 4 logs files located in the same directory (see property sonar.path.logs below), -# one per process: -# Main process (aka. App) logs in sonar.log -# Web Server (aka. Web) logs in web.log -# Compute Engine (aka. CE) logs in ce.log -# Elasticsearch (aka. ES) logs in es.log -# -# All 4 files follow the same rolling policy (see sonar.log.rollingPolicy and sonar.log.maxFiles) but it applies -# individually (eg. if sonar.log.maxFiles=4, there can be at most 4 of each files, ie. 16 files in total). -# -# All 4 files have logs in the same format: -# 1 2 3 4 5 6 -# |-----------------| |---| |-|--------------------||------------------------------| |------------------------------------------------------------------------------------------------------------------------------| -# 2016.11.16 16:47:00 INFO ce[AVht0dNXFcyiYejytc3m][o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=org.sonarqube:example-java-maven | type=REPORT | id=AVht0dNXFcyiYejytc3m | submitter=admin | time=1699ms -# -# 1: timestamp. Format is YYYY.MM.DD HH:MM:SS -# YYYY: year on 4 digits -# MM: month on 2 digits -# DD: day on 2 digits -# HH: hour of day on 2 digits in 24 hours format -# MM: minutes on 2 digits -# SS: seconds on 2 digits -# 2: log level. -# Possible values (in order of descending criticality): ERROR, WARN, INFO, DEBUG and TRACE -# 3: process identifier. Possible values: app (main), web (Web Server), ce (Compute Engine) and es (Elasticsearch) -# 4: SQ thread identifier. Can be empty. -# In the Web Server, if present, it will be the HTTP request ID. -# In the Compute Engine, if present, it will be the task ID. -# 5: logger name. Usually a class canonical name. -# Package names are truncated to keep the whole field to 20 characters max -# 6: log payload. Content of this field does not follow any specific format, can vary in length and include line returns. -# Some logs, however, will follow the convention to provide data in payload in the format " | key=value" -# Especially, log of profiled pieces of code will end with " | time=XXXXms". - -# Global level of logs (applies to all 4 processes). -# Supported values are INFO (default), DEBUG and TRACE -#sonar.log.level=INFO - -# Level of logs of each process can be controlled individually with their respective properties. -# When specified, they overwrite the level defined at global level. -# Supported values are INFO, DEBUG and TRACE -#sonar.log.level.app=INFO -#sonar.log.level.web=INFO -#sonar.log.level.ce=INFO -#sonar.log.level.es=INFO - -# Path to log files. Can be absolute or relative to installation directory. -# Default is /logs -#sonar.path.logs=logs - -# Rolling policy of log files -# - based on time if value starts with "time:", for example by day ("time:yyyy-MM-dd") -# or by month ("time:yyyy-MM") -# - based on size if value starts with "size:", for example "size:10MB" -# - disabled if value is "none". That needs logs to be managed by an external system like logrotate. -#sonar.log.rollingPolicy=time:yyyy-MM-dd - -# Maximum number of files to keep if a rolling policy is enabled. -# - maximum value is 20 on size rolling policy -# - unlimited on time rolling policy. Set to zero to disable old file purging. -#sonar.log.maxFiles=7 - -# Access log is the list of all the HTTP requests received by server. If enabled, it is stored -# in the file {sonar.path.logs}/access.log. This file follows the same rolling policy as other log file -# (see sonar.log.rollingPolicy and sonar.log.maxFiles). -#sonar.web.accessLogs.enable=true - -# Format of access log. It is ignored if sonar.web.accessLogs.enable=false. Possible values are: -# - "common" is the Common Log Format, shortcut to: %h %l %u %user %date "%r" %s %b -# - "combined" is another format widely recognized, shortcut to: %h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" -# - else a custom pattern. See http://logback.qos.ch/manual/layouts.html#AccessPatternLayout. -# The login of authenticated user is not implemented with "%u" but with "%reqAttribute{LOGIN}" (since version 6.1). -# The value displayed for anonymous users is "-". -# The SonarQube's HTTP request ID can be added to the pattern with "%reqAttribute{ID}" (since version 6.2). -# If SonarQube is behind a reverse proxy, then the following value allows to display the correct remote IP address: -#sonar.web.accessLogs.pattern=%i{X-Forwarded-For} %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" "%reqAttribute{ID}" -# Default value (which was "combined" before version 6.2) is equivalent to "combined + SQ HTTP request ID": -#sonar.web.accessLogs.pattern=%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" "%reqAttribute{ID}" - -#-------------------------------------------------------------------------------------------------- -# OTHERS - -# Delay in seconds between processing of notification queue. Default is 60 seconds. -#sonar.notifications.delay=60 - -# Paths to persistent data files (embedded database and search index) and temporary files. -# Can be absolute or relative to installation directory. -# Defaults are respectively /data and /temp -#sonar.path.data=data -#sonar.path.temp=temp - -# Telemetry - Share anonymous SonarQube statistics -# By sharing anonymous SonarQube statistics, you help us understand how SonarQube is used so we can improve the product to work even better for you. -# We don't collect source code or IP addresses. And we don't share the data with anyone else. -# To see an example of the data shared: login as a global administrator, call the WS api/system/info and check the Statistics field. -sonar.telemetry.enable=false - -#-------------------------------------------------------------------------------------------------- -# DEVELOPMENT - only for developers -# The following properties MUST NOT be used in production environments. - -# Elasticsearch HTTP connector -#sonar.search.httpPort=-1 +# Property values can: +# - be overridden by environment variables. The name of the corresponding environment variable is the +# upper-cased name of the property where all the dot ('.') and dash ('-') characters are replaced by +# underscores ('_'). For example, to override 'sonar.web.systemPasscode' use 'SONAR_WEB_SYSTEMPASSCODE'. +# - be encrypted. See https://redirect.sonarsource.com/doc/settings-encryption.html + +#-------------------------------------------------------------------------------------------------- +# DATABASE +# +# IMPORTANT: +# - The embedded H2 database is used by default. It is recommended for tests but not for +# production use. Supported databases are Oracle, PostgreSQL and Microsoft SQLServer. +# - Changes to database connection URL (sonar.jdbc.url) can affect SonarSource licensed products. + +# User credentials. +# Permissions to create tables, indices and triggers must be granted to JDBC user. +# The schema must be created first. +#sonar.jdbc.username= +#sonar.jdbc.password= + +#----- Embedded Database (default) +# H2 embedded database server listening port, defaults to 9092 +#sonar.embeddedDatabase.port=9092 + +#----- Oracle 12c/18c/19c +# The Oracle JDBC driver must be copied into the directory extensions/jdbc-driver/oracle/. +# Only the thin client is supported, and we recommend using the latest Oracle JDBC driver. See +# https://jira.sonarsource.com/browse/SONAR-9758 for more details. +# If you need to set the schema, please refer to http://jira.sonarsource.com/browse/SONAR-5000 +#sonar.jdbc.url=jdbc:oracle:thin:@localhost:1521/XE + +#----- PostgreSQL 9.3 or greater +# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema". +#sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=my_schema + +#----- Microsoft SQLServer 2014/2016/2017/2019 and SQL Azure +# A database named sonar must exist and its collation must be case-sensitive (CS) and accent-sensitive (AS) +# Use the following connection string if you want to use integrated security with Microsoft Sql Server +# Do not set sonar.jdbc.username or sonar.jdbc.password property if you are using Integrated Security +# For Integrated Security to work, you have to download the Microsoft SQL JDBC Driver 9.2.0 package from +# https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver15#92 +# and copy mssql-jdbc_auth-9.2.0.x64.dll to your path. +#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true + +# Use the following connection string if you want to use SQL Auth while connecting to MS Sql Server. +# Set the sonar.jdbc.username and sonar.jdbc.password appropriately. +#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar + +#----- Connection pool settings +# The maximum number of active connections that can be allocated +# at the same time, or negative for no limit. +# The recommended value is 1.2 * max sizes of HTTP pools. For example if HTTP ports are +# enabled with default sizes (50, see property sonar.web.http.maxThreads) +# then sonar.jdbc.maxActive should be 1.2 * 50 = 60. +#sonar.jdbc.maxActive=60 + +# The maximum number of connections that can remain idle in the +# pool, without extra ones being released, or negative for no limit. +#sonar.jdbc.maxIdle=5 + +# The minimum number of connections that can remain idle in the pool, +# without extra ones being created, or zero to create none. +#sonar.jdbc.minIdle=2 + +# The maximum number of milliseconds that the pool will wait (when there +# are no available connections) for a connection to be returned before +# throwing an exception, or <= 0 to wait indefinitely. +#sonar.jdbc.maxWait=5000 + +#sonar.jdbc.minEvictableIdleTimeMillis=600000 +#sonar.jdbc.timeBetweenEvictionRunsMillis=30000 + +#-------------------------------------------------------------------------------------------------- +# WEB SERVER +# Web server is executed in a dedicated Java process. By default heap size is 512MB. +# Use the following property to customize JVM options. +# Recommendations: +# +# The HotSpot Server VM is recommended. The property -server should be added if server mode +# is not enabled by default on your environment: +# http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html +# +# Startup can be long if entropy source is short of entropy. Adding +# -Djava.security.egd=file:/dev/./urandom is an option to resolve the problem. +# See https://wiki.apache.org/tomcat/HowTo/FasterStartUp#Entropy_Source +# +#sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError + +# Same as previous property, but allows to not repeat all other settings like -Xmx +#sonar.web.javaAdditionalOpts= + +# Binding IP address. For servers with more than one IP address, this property specifies which +# address will be used for listening on the specified ports. +# By default, ports will be used on all IP addresses associated with the server. +#sonar.web.host=0.0.0.0 + +# Web context. When set, it must start with forward slash (for example /sonarqube). +# The default value is root context (empty value). +#sonar.web.context= +# TCP port for incoming HTTP connections. Default value is 9000. +#sonar.web.port=9000 + +# The maximum number of connections that the server will accept and process at any given time. +# When this number has been reached, the server will not accept any more connections until +# the number of connections falls below this value. The operating system may still accept connections +# based on the sonar.web.connections.acceptCount property. The default value is 50. +#sonar.web.http.maxThreads=50 + +# The minimum number of threads always kept running. The default value is 5. +#sonar.web.http.minThreads=5 + +# The maximum queue length for incoming connection requests when all possible request processing +# threads are in use. Any requests received when the queue is full will be refused. +# The default value is 25. +#sonar.web.http.acceptCount=25 + +# By default users are logged out and sessions closed when server is restarted. +# If you prefer keeping user sessions open, a secret should be defined. Value is +# HS256 key encoded with base64. It must be unique for each installation of SonarQube. +# Example of command-line: +# echo -n "type_what_you_want" | openssl dgst -sha256 -hmac "key" -binary | base64 +#sonar.auth.jwtBase64Hs256Secret= + +# The inactivity timeout duration of user sessions, in minutes. After the configured +# period of time, the user is logged out. +# The default value is set to 3 days (4320 minutes). +# It must be set between 5 minutes and 3 months. +# Value must be strictly positive. +#sonar.web.sessionTimeoutInMinutes=4320 + +# A passcode can be defined to access some web services from monitoring +# tools without having to use the credentials of a system administrator. +# Check the Web API documentation to know which web services are supporting this authentication mode. +# The passcode should be provided in HTTP requests with the header "X-Sonar-Passcode". +# By default feature is disabled. +#sonar.web.systemPasscode= + +#-------------------------------------------------------------------------------------------------- +# SSO AUTHENTICATION + +# Enable authentication using HTTP headers +#sonar.web.sso.enable=false + +# Name of the header to get the user login. +# Only alphanumeric, '.' and '@' characters are allowed +#sonar.web.sso.loginHeader=X-Forwarded-Login + +# Name of the header to get the user name +#sonar.web.sso.nameHeader=X-Forwarded-Name + +# Name of the header to get the user email (optional) +#sonar.web.sso.emailHeader=X-Forwarded-Email + +# Name of the header to get the list of user groups, separated by comma (optional). +# If the sonar.sso.groupsHeader is set, the user will belong to those groups if groups exist in SonarQube. +# If none of the provided groups exists in SonarQube, the user will only belong to the default group. +# Note that the default group will always be set. +#sonar.web.sso.groupsHeader=X-Forwarded-Groups + +# Interval used to know when to refresh name, email and groups. +# During this interval, if for instance the name of the user is changed in the header, it will only be updated after X minutes. +#sonar.web.sso.refreshIntervalInMinutes=5 + +#-------------------------------------------------------------------------------------------------- +# LDAP CONFIGURATION + +# Enable the LDAP feature +# sonar.security.realm=LDAP + +# Set to true when connecting to a LDAP server using a case-insensitive setup. +# sonar.authenticator.downcase=true + +# URL of the LDAP server. Note that if you are using ldaps, then you should install the server certificate into the Java truststore. +# ldap.url=ldap://localhost:10389 + +# Bind DN is the username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory (optional) +# ldap.bindDn=cn=sonar,ou=users,o=mycompany + +# Bind Password is the password of the user to connect with. Leave this blank for anonymous access to the LDAP directory (optional) +# ldap.bindPassword=secret + +# Possible values: simple | CRAM-MD5 | DIGEST-MD5 | GSSAPI See http://java.sun.com/products/jndi/tutorial/ldap/security/auth.html (default: simple) +# ldap.authentication=simple + +# See : +# * http://java.sun.com/products/jndi/tutorial/ldap/security/digest.html +# * http://java.sun.com/products/jndi/tutorial/ldap/security/crammd5.html +# (optional) +# ldap.realm=example.org + +# Context factory class (optional) +# ldap.contextFactoryClass=com.sun.jndi.ldap.LdapCtxFactory + +# Enable usage of StartTLS (default : false) +# ldap.StartTLS=true + +# Follow or not referrals. See http://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html (default: true) +# ldap.followReferrals=false + +# USER MAPPING + +# Distinguished Name (DN) of the root node in LDAP from which to search for users (mandatory) +# ldap.user.baseDn=cn=users,dc=example,dc=org + +# LDAP user request. (default: (&(objectClass=inetOrgPerson)(uid={login})) ) +# ldap.user.request=(&(objectClass=user)(sAMAccountName={login})) + +# Attribute in LDAP defining the user’s real name. (default: cn) +# ldap.user.realNameAttribute=name + +# Attribute in LDAP defining the user’s email. (default: mail) +# ldap.user.emailAttribute=email + +# GROUP MAPPING + +# Distinguished Name (DN) of the root node in LDAP from which to search for groups. (optional, default: empty) +# ldap.group.baseDn=cn=groups,dc=example,dc=org + +# LDAP group request (default: (&(objectClass=groupOfUniqueNames)(uniqueMember={dn})) ) +# ldap.group.request=(&(objectClass=group)(member={dn})) + +# Property used to specifiy the attribute to be used for returning the list of user groups in the compatibility mode. (default: cn) +# ldap.group.idAttribute=sAMAccountName + +#-------------------------------------------------------------------------------------------------- +# COMPUTE ENGINE +# The Compute Engine is responsible for processing background tasks. +# Compute Engine is executed in a dedicated Java process. Default heap size is 512MB. +# Use the following property to customize JVM options. +# Recommendations: +# +# The HotSpot Server VM is recommended. The property -server should be added if server mode +# is not enabled by default on your environment: +# http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html +# +#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError + +# Same as previous property, but allows to not repeat all other settings like -Xmx +#sonar.ce.javaAdditionalOpts= + +#-------------------------------------------------------------------------------------------------- +# ELASTICSEARCH +# Elasticsearch is used to facilitate fast and accurate information retrieval. +# It is executed in a dedicated Java process. Default maximum heap size is 512MB. +# It is recommended to also set MaxDirectMemorySize (-XX:MaxDirectMemorySize) and set it to half the maximum heap size. +# +# -------------------------------------------------- +# Word of caution for Linux users on 64bits systems +# -------------------------------------------------- +# Please ensure Virtual Memory on your system is correctly configured for Elasticsearch to run properly +# (see https://www.elastic.co/guide/en/elasticsearch/reference/5.5/vm-max-map-count.html for details). +# +# When SonarQube runs standalone, a warning such as the following may appear in logs/es.log: +# "max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]" +# When SonarQube runs as a cluster, however, Elasticsearch will refuse to start. +# + +# JVM options of Elasticsearch process +#sonar.search.javaOpts=-Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError + +# Same as previous property, but allows to not repeat all other settings like -Xmx +#sonar.search.javaAdditionalOpts= + +# Elasticsearch port for incoming HTTP connections. Default is 9001. Use 0 to get a free port. +# As a security precaution, should be blocked by a firewall and not exposed to the Internet. +#sonar.search.port=9001 + +# Elasticsearch TCP transport port that is bound to loopback address. When nothing is set, a random port will be chosen. +# As a security precaution, your OS configuration should not expose this port for external access. +#sonar.es.port= + +# Elasticsearch host. The search server will bind this address and the search client will connect to it. +# Default is loopback address. +# As a security precaution, should NOT be set to a publicly available address. +#sonar.search.host= + +#-------------------------------------------------------------------------------------------------- +# UPDATE CENTER + +# Update Center requires an internet connection to request https://update.sonarsource.org +# It is enabled by default. +#sonar.updatecenter.activate=true + +# HTTP proxy (default none) +#http.proxyHost= +#http.proxyPort= +# HTTPS proxy (defaults are values of http.proxyHost and http.proxyPort) +#https.proxyHost= +#https.proxyPort= + +# NT domain name if NTLM proxy is used +#http.auth.ntlm.domain= + +# SOCKS proxy (default none) +#socksProxyHost= +#socksProxyPort= + +# Proxy authentication (used for HTTP, HTTPS and SOCKS proxies) +#http.proxyUser= +#http.proxyPassword= + +# Proxy exceptions: list of hosts that can be accessed without going through the proxy +# separated by the '|' character, wildcard character '*' can be used for pattern matching +# used for HTTP and HTTPS (default none) +# (note: localhost and its literal notations (127.0.0.1, ...) are always excluded) +#http.nonProxyHosts= + +#-------------------------------------------------------------------------------------------------- +# LOGGING + +# SonarQube produces logs in 4 logs files located in the same directory (see property sonar.path.logs below), +# one per process: +# Main process (aka. App) logs in sonar.log +# Web Server (aka. Web) logs in web.log +# Compute Engine (aka. CE) logs in ce.log +# Elasticsearch (aka. ES) logs in es.log +# +# Depending on the startup, all 4 files follow the same rolling policy (see sonar.log.rollingPolicy and sonar.log.maxFiles) but it applies +# individually (eg. if sonar.log.maxFiles=4, there can be at most 4 of each files, ie. 16 files in total). +# If the SonarQube wrapper is used (for example, with the provided start.sh script), the sonar.log rotation policy needs to be set in the wrapper.conf +# +# All 4 files have logs in the same format: +# 1 2 3 4 5 6 +# |-----------------| |---| |-|--------------------||------------------------------| |------------------------------------------------------------------------------------------------------------------------------| +# 2016.11.16 16:47:00 INFO ce[AVht0dNXFcyiYejytc3m][o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=org.sonarqube:example-java-maven | type=REPORT | id=AVht0dNXFcyiYejytc3m | submitter=admin | time=1699ms +# +# 1: timestamp. Format is YYYY.MM.DD HH:MM:SS +# YYYY: year on 4 digits +# MM: month on 2 digits +# DD: day on 2 digits +# HH: hour of day on 2 digits in 24 hours format +# MM: minutes on 2 digits +# SS: seconds on 2 digits +# 2: log level. +# Possible values (in order of descending criticality): ERROR, WARN, INFO, DEBUG and TRACE +# 3: process identifier. Possible values: app (main), web (Web Server), ce (Compute Engine) and es (Elasticsearch) +# 4: SQ thread identifier. Can be empty. +# In the Web Server, if present, it will be the HTTP request ID. +# In the Compute Engine, if present, it will be the task ID. +# 5: logger name. Usually a class canonical name. +# Package names are truncated to keep the whole field to 20 characters max +# 6: log payload. Content of this field does not follow any specific format, can vary in length and include line returns. +# Some logs, however, will follow the convention to provide data in payload in the format " | key=value" +# Especially, log of profiled pieces of code will end with " | time=XXXXms". + +# Global level of logs (applies to all 4 processes). +# Supported values are INFO (default), DEBUG and TRACE +#sonar.log.level=INFO + +# Level of logs of each process can be controlled individually with their respective properties. +# When specified, they overwrite the level defined at global level. +# Supported values are INFO, DEBUG and TRACE +#sonar.log.level.app=INFO +#sonar.log.level.web=INFO +#sonar.log.level.ce=INFO +#sonar.log.level.es=INFO + +# Path to log files. Can be absolute or relative to installation directory. +# Default is /logs +#sonar.path.logs=logs + +# Rolling policy of log files +# - based on time if value starts with "time:", for example by day ("time:yyyy-MM-dd") +# or by month ("time:yyyy-MM") +# - based on size if value starts with "size:", for example "size:10MB" +# - disabled if value is "none". That needs logs to be managed by an external system like logrotate. +#sonar.log.rollingPolicy=time:yyyy-MM-dd + +# Maximum number of files to keep if a rolling policy is enabled. +# - maximum value is 20 on size rolling policy +# - unlimited on time rolling policy. Set to zero to disable old file purging. +#sonar.log.maxFiles=7 + +# Access log is the list of all the HTTP requests received by server. If enabled, it is stored +# in the file {sonar.path.logs}/access.log. This file follows the same rolling policy as other log file +# (see sonar.log.rollingPolicy and sonar.log.maxFiles). +#sonar.web.accessLogs.enable=true + +# Format of access log. It is ignored if sonar.web.accessLogs.enable=false. Possible values are: +# - "common" is the Common Log Format, shortcut to: %h %l %u %user %date "%r" %s %b +# - "combined" is another format widely recognized, shortcut to: %h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" +# - else a custom pattern. See http://logback.qos.ch/manual/layouts.html#AccessPatternLayout. +# The login of authenticated user is not implemented with "%u" but with "%reqAttribute{LOGIN}" (since version 6.1). +# The value displayed for anonymous users is "-". +# The SonarQube's HTTP request ID can be added to the pattern with "%reqAttribute{ID}" (since version 6.2). +# If SonarQube is behind a reverse proxy, then the following value allows to display the correct remote IP address: +#sonar.web.accessLogs.pattern=%i{X-Forwarded-For} %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" "%reqAttribute{ID}" +# Default value (which was "combined" before version 6.2) is equivalent to "combined + SQ HTTP request ID": +#sonar.web.accessLogs.pattern=%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" "%reqAttribute{ID}" + +#-------------------------------------------------------------------------------------------------- +# OTHERS + +# Delay in seconds between processing of notification queue. Default is 60 seconds. +#sonar.notifications.delay=60 + +# Paths to persistent data files (embedded database and search index) and temporary files. +# Can be absolute or relative to installation directory. +# Defaults are respectively /data and /temp +#sonar.path.data=data +#sonar.path.temp=temp + +# Telemetry - Share anonymous SonarQube statistics +# By sharing anonymous SonarQube statistics, you help us understand how SonarQube is used so we can improve the product to work even better for you. +# We don't collect source code or IP addresses. And we don't share the data with anyone else. +# To see an example of the data shared: login as a global administrator, call the WS api/system/info and check the Statistics field. +sonar.telemetry.enable=false diff --git a/dev/build.sh b/dev/build.sh index 4d7cfa2..adc34f0 100755 --- a/dev/build.sh +++ b/dev/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -eu -export SONAR_SCALA_VERSION=8.7.0+7-b082d533-SNAPSHOT +export SONAR_SCALA_VERSION=8.7.0+21-736a5867+20211215-1535-SNAPSHOT cp ~/.ivy2/local/com.sonar-scala/sonar-scala_2.13/${SONAR_SCALA_VERSION}/jars/sonar-scala_2.13-assembly.jar . docker build -t mwizner/sonarqube-scala-plugins:dev --build-arg SONAR_SCALA_VERSION=${SONAR_SCALA_VERSION} . diff --git a/docker-compose-lts.yml b/docker-compose-lts.yml index 86d6b45..602910d 100644 --- a/docker-compose-lts.yml +++ b/docker-compose-lts.yml @@ -1,48 +1,49 @@ version: "2" services: - sonarqube-lts: - image: sonarqube:7.9.1-community # lts + sonarqube: + image: sonarqube:8.9.4-community # lts ports: - "80:9000" networks: - - sonarnet_lts + - sonarnet environment: - SONARQUBE_JDBC_USERNAME=sonar - SONARQUBE_JDBC_PASSWORD=sonar - - SONARQUBE_JDBC_URL=jdbc:postgresql://db-lts:5432/sonar + - SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar volumes: - - ./conf/sonar-lts.properties:/opt/sonarqube/conf/sonar.properties + - ./conf/sonar.properties:/opt/sonarqube/conf/sonar.properties - ./logs:/opt/sonarqube/logs - - sonarqube_lts_data:/opt/sonarqube/data - - sonarqube_lts_bundled-plugins:/opt/sonarqube/lib/bundled-plugins + - sonarqube_data:/opt/sonarqube/data + - sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins volumes_from: - - plugins-lts + - plugins depends_on: - - db-lts - db-lts: - image: postgres:10.11-alpine + - db + entrypoint: ["bash", "-c", "rm lib/extensions/sonar-scala*; bin/run.sh"] + db: + image: postgres:12.9-alpine networks: - - sonarnet_lts + - sonarnet environment: - POSTGRES_USER=sonar - POSTGRES_PASSWORD=sonar volumes: - - postgresql_lts:/var/lib/postgresql - - postgresql_lts_data:/var/lib/postgresql/data - plugins-lts: - image: mwizner/sonarqube-scala-plugins:4.2.0 + - postgresql:/var/lib/postgresql + - postgresql_data:/var/lib/postgresql/data + plugins: + image: mwizner/sonarqube-scala-plugins:5.8.0 volumes: - - sonarqube_lts_plugins:/opt/sonarqube/extensions/plugins + - sonarqube_plugins:/opt/sonarqube/extensions/plugins command: /bin/true networks: - sonarnet_lts: + sonarnet: driver: bridge volumes: - sonarqube_lts_data: - sonarqube_lts_bundled-plugins: - sonarqube_lts_plugins: - postgresql_lts: - postgresql_lts_data: + sonarqube_data: + sonarqube_bundled-plugins: + sonarqube_plugins: + postgresql: + postgresql_data: diff --git a/lts-7.9/Dockerfile b/lts-7.9/Dockerfile new file mode 100644 index 0000000..3bd5bc9 --- /dev/null +++ b/lts-7.9/Dockerfile @@ -0,0 +1,13 @@ +# Minideb image with bundled sonar-scala (https://github.com/mwz/sonar-scala), +# which can be mounted as a volume into a SonarQube container. + +FROM bitnami/minideb:stretch +RUN install_packages curl ca-certificates + +ENV SONAR_SCALA_VERSION 7.9.0 + +RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube +WORKDIR /opt/sonarqube/extensions/plugins +RUN curl -L -o "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \ + "https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/sonar-scala_2.12-${SONAR_SCALA_VERSION}-assembly.jar" +RUN chown -R sonarqube:sonarqube /opt/sonarqube diff --git a/lts-7.9/full/Dockerfile b/lts-7.9/full/Dockerfile new file mode 100644 index 0000000..115017d --- /dev/null +++ b/lts-7.9/full/Dockerfile @@ -0,0 +1,12 @@ +# SonarQube image with bundled sonar-scala (https://github.com/mwz/sonar-scala). + +FROM sonarqube:7.9.1-community + +ENV SONAR_SCALA_VERSION 7.9.0 + +WORKDIR /opt/sonarqube/extensions/plugins +RUN rm sonar-scala-plugin-* && curl -L -o "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \ + "https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/sonar-scala_2.12-${SONAR_SCALA_VERSION}-assembly.jar" + +WORKDIR $SONARQUBE_HOME +ENTRYPOINT ["./bin/run.sh"] diff --git a/lts/Dockerfile b/lts/Dockerfile index 3bd5bc9..98551ae 100644 --- a/lts/Dockerfile +++ b/lts/Dockerfile @@ -4,10 +4,11 @@ FROM bitnami/minideb:stretch RUN install_packages curl ca-certificates -ENV SONAR_SCALA_VERSION 7.9.0 +ENV SONAR_SCALA_VERSION 8.9.0 +ENV SQ_EXTENSIONS_DIR "/opt/sonarqube/extensions" -RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube -WORKDIR /opt/sonarqube/extensions/plugins -RUN curl -L -o "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \ - "https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/sonar-scala_2.12-${SONAR_SCALA_VERSION}-assembly.jar" -RUN chown -R sonarqube:sonarqube /opt/sonarqube +RUN groupadd -g 1000 -r sonarqube && useradd -r -g sonarqube sonarqube +RUN curl --create-dirs -L -o "${SQ_EXTENSIONS_DIR}/plugins/sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \ + "https://s01.oss.sonatype.org/content/repositories/releases/com/sonar-scala/sonar-scala_2.13/${SONAR_SCALA_VERSION}/sonar-scala_2.13-${SONAR_SCALA_VERSION}-assembly.jar" && \ + chown -R sonarqube:sonarqube /opt/sonarqube && \ + chmod 777 $SQ_EXTENSIONS_DIR/plugins/* diff --git a/lts/full/Dockerfile b/lts/full/Dockerfile index 115017d..2f4bb61 100644 --- a/lts/full/Dockerfile +++ b/lts/full/Dockerfile @@ -1,12 +1,14 @@ -# SonarQube image with bundled sonar-scala (https://github.com/mwz/sonar-scala). +# SonarQube 8.9 LTS image with bundled sonar-scala (https://github.com/mwz/sonar-scala). -FROM sonarqube:7.9.1-community +FROM sonarqube:8.9.4-community -ENV SONAR_SCALA_VERSION 7.9.0 +ENV SONAR_SCALA_VERSION 8.9.0 -WORKDIR /opt/sonarqube/extensions/plugins -RUN rm sonar-scala-plugin-* && curl -L -o "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \ - "https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/sonar-scala_2.12-${SONAR_SCALA_VERSION}-assembly.jar" +RUN rm $SONARQUBE_HOME/lib/extensions/sonar-scala* && \ + wget -O "${SQ_EXTENSIONS_DIR}/plugins/sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \ + "https://s01.oss.sonatype.org/content/repositories/releases/com/sonar-scala/sonar-scala_2.13/${SONAR_SCALA_VERSION}/sonar-scala_2.13-${SONAR_SCALA_VERSION}-assembly.jar" && \ + chown sonarqube:sonarqube $SQ_EXTENSIONS_DIR/plugins/sonar-scala-plugin-* && \ + chmod 777 $SQ_EXTENSIONS_DIR/plugins/sonar-scala-plugin-* WORKDIR $SONARQUBE_HOME ENTRYPOINT ["./bin/run.sh"] diff --git a/vars.json b/vars.json index 7286a20..f9b9f56 100644 --- a/vars.json +++ b/vars.json @@ -7,6 +7,13 @@ "sonarScala": "8.7.0" }, "lts": { + "version": "5.8.0", + "sonar": "8.9.4 LTS", + "sonarDocs": "https://docs.sonarqube.org/8.9", + "sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=17027", + "sonarScala": "8.9.0" + }, + "lts79": { "version": "4.2.0", "sonar": "7.9.1 LTS", "sonarDocs": "https://docs.sonarqube.org/7.9", @@ -136,6 +143,13 @@ } ], "lts": [ + { + "version": "4.2.0", + "sonar": "7.9.1 LTS", + "sonarDocs": "https://docs.sonarqube.org/7.9", + "sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15029", + "sonarScala": "7.9.0" + }, { "version": "4.1.0", "sonar": "7.9.1 LTS", @@ -150,13 +164,6 @@ "sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15029", "sonarScala": "7.7.0" }, - { - "version": "2.12.0", - "sonar": "6.7.7 LTS", - "sonarDocs": "https://docs.sonarqube.org/display/SONARQUBE67/Documentation", - "sonarChangelog": "https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14865", - "sonarScala": "6.8.0" - }, { "version": "2.11.0", "sonar": "6.7.6 LTS",