Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Upgrade SonarQube to 9.4 & sonar-scala to 9.0.0 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwz authored May 10, 2022
1 parent 978202f commit a78df75
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
.idea
.metals
.vscode
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# sonar-scala-docker

[![GitHub version](<https://img.shields.io/badge/release_(for_SonarQube_8.7.1)-v5.7.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version](<https://img.shields.io/badge/release_(for_SonarQube_9.4.0)-v6.0.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version lts](<https://img.shields.io/badge/release_(for_SonarQube_LTS_8.9)-v5.8.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version lts 7.9](<https://img.shields.io/badge/release_(for_SonarQube_LTS_7.9)-v4.2.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version lts 6.7](<https://img.shields.io/badge/release_(for_SonarQube_LTS_6.7)-v2.12.0-blue.svg>)](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 8.7.1](https://www.sonarqube.org),
[SonarQube 9.4.0](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 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) instance with
Expand Down Expand Up @@ -37,7 +37,7 @@ default SonarQube login details for the Administrator account are `admin:admin`.

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:6.0.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)(or
`mwizner/sonarqube-scala-plugins:latest-full`) and
[`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
Expand All @@ -58,7 +58,7 @@ docker run -d \
-e SONARQUBE_JDBC_USERNAME=sonar \
-e SONARQUBE_JDBC_PASSWORD=sonar \
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
mwizner/sonarqube-scala-plugins:5.7.0-full
mwizner/sonarqube-scala-plugins:6.0.0-full
```

Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable,
Expand All @@ -70,16 +70,16 @@ want to try the image, you can use the following command:
docker run -d \
--name sonarqube-scala-plugins-full \
-p 80:9000 \
mwizner/sonarqube-scala-plugins:5.7.0-full
mwizner/sonarqube-scala-plugins:6.0.0-full
```

## Dependencies

- [SonarQube 8.7.1](https://hub.docker.com/_/sonarqube) or
- [SonarQube 9.4.0](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)
- [PostgreSQL 12/13](https://hub.docker.com/_/postgres)
- [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for
scalastyle, scoverage and scapegoat

Expand All @@ -92,7 +92,7 @@ scapegoat support)_
<!-- prettier-ignore-start -->
|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)
[6.0.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/6.0.0) | 9.4.0 [documentation](https://docs.sonarqube.org/9.4), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=17167) | [9.0.0](https://github.com/mwz/sonar-scala/releases/tag/v9.0.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)
Expand All @@ -107,6 +107,12 @@ scapegoat support)_
<td><b>sonar-scala</b></td>
<td><b>sonar-scala-extra</b></td>
</tr>
<tr>
<td><a href="https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.7.0">5.7.0</a></td>
<td>8.7.1 <a href="https://docs.sonarqube.org/8.7">documentation</a>, <a href="https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16540">changelog</a></td>
<td><a href="https://github.com/mwz/sonar-scala/releases/tag/v8.7.0">8.7.0</td>
<td></td>
</tr>
<tr>
<td><a href="https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.6.0">5.6.0</a></td>
<td>8.5.1 <a href="https://docs.sonarqube.org/8.5">documentation</a>, <a href="https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16342">changelog</a></td>
Expand Down
2 changes: 1 addition & 1 deletion README.tpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ docker run -d \
[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)
- [PostgreSQL 12/13](https://hub.docker.com/_/postgres)
- [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for
scalastyle, scoverage and scapegoat

Expand Down
24 changes: 12 additions & 12 deletions README_DOCKERHUB.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Docker images with out-of-the-box
[SonarQube 8.7.1](https://www.sonarqube.org),
[SonarQube 9.4.0](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 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) instance with
Expand All @@ -19,11 +19,11 @@ Starting from version `2.7.0`, the images no longer contain the
[sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) plugin as
sonar-scala provides Scapegoat support from version `6.5.0` onwards.

- `5.7.0`, `latest`
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.7.0/Dockerfile),
`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)
- `6.0.0`, `latest`
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/6.0.0/Dockerfile),
`6.0.0-full`, `latest-full`
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/6.0.0-full/Dockerfile),
[Release 6.0.0](https://github.com/mwz/sonar-scala-docker/releases/tag/6.0.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)
Expand All @@ -47,8 +47,8 @@ For older versions please check the

| Version | SonarQube | sonar-scala |
| ------------------------ | ----------------- | ---------------------- |
| 5.7.0 | | 8.7.0 |
| 5.7.0-full | 8.7.1 | 8.7.0 |
| 6.0.0 | | 9.0.0 |
| 6.0.0-full | 9.4.0 | 9.0.0 |
| 5.8.0 | | 8.9.0 |
| 5.8.0-full | 8.9.4 LTS | 8.9.0 |
| 4.2.0 | | 7.9.0 |
Expand All @@ -66,7 +66,7 @@ version: "2"
services:
sonarqube:
image: sonarqube:8.7.1-community
image: sonarqube:9.4.0-community
ports:
- "80:9000"
networks:
Expand All @@ -75,7 +75,7 @@ services:
- plugins
plugins:
image: mwizner/sonarqube-scala-plugins:5.7.0
image: mwizner/sonarqube-scala-plugins:6.0.0
volumes:
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
command: /bin/true
Expand Down Expand Up @@ -103,7 +103,7 @@ docker run -d \
-e SONARQUBE_JDBC_USERNAME=sonar \
-e SONARQUBE_JDBC_PASSWORD=sonar \
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
mwizner/sonarqube-scala-plugins:5.7.0-full
mwizner/sonarqube-scala-plugins:6.0.0-full
```

Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable,
Expand All @@ -115,7 +115,7 @@ want to try the image, you can use the following command:
docker run -d \
--name sonarqube-scala-plugins-full \
-p 80:9000 \
mwizner/sonarqube-scala-plugins:5.7.0-full
mwizner/sonarqube-scala-plugins:6.0.0-full
```

## Repository
Expand Down
20 changes: 13 additions & 7 deletions conf/sonar.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@
# H2 embedded database server listening port, defaults to 9092
#sonar.embeddedDatabase.port=9092

#----- Oracle 11g/12c/18c/19c
#----- 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
#----- PostgreSQL 9.6 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
#----- 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.
# For Integrated Security to work, you have to download the Microsoft SQL JDBC Driver 9.4.1 package from
# https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver15#94
# and copy mssql-jdbc_auth-9.4.1.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.
Expand Down Expand Up @@ -114,6 +114,12 @@
# The default value is 25.
#sonar.web.http.acceptCount=25

# The number of milliseconds this Connector will wait for another HTTP request before closing the
# connection. The default value is to use the value that has been set for the connectionTimeout
# attribute. Use a value of -1 to indicate no (i.e. infinite) timeout.
# The default value is 60000 (ms).
#sonar.web.http.keepAliveTimeout=60000

# 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.
Expand All @@ -124,7 +130,7 @@
# 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.
# It must be set between 6 minutes and 3 months (129600 minutes).
# Value must be strictly positive.
#sonar.web.sessionTimeoutInMinutes=4320

Expand Down
2 changes: 1 addition & 1 deletion current/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
FROM bitnami/minideb:stretch
RUN install_packages curl ca-certificates

ENV SONAR_SCALA_VERSION 8.7.0
ENV SONAR_SCALA_VERSION 9.0.0
ENV SQ_EXTENSIONS_DIR "/opt/sonarqube/extensions"

RUN groupadd -g 1000 -r sonarqube && useradd -r -g sonarqube sonarqube
Expand Down
6 changes: 3 additions & 3 deletions current/full/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SonarQube 8.7 image with bundled sonar-scala (https://github.com/mwz/sonar-scala).
# SonarQube 9.4 image with bundled sonar-scala (https://github.com/mwz/sonar-scala).

FROM sonarqube:8.7.1-community
FROM sonarqube:9.4.0-community

ENV SONAR_SCALA_VERSION 8.7.0
ENV SONAR_SCALA_VERSION 9.0.0

RUN rm $SONARQUBE_HOME/lib/extensions/sonar-scala* && \
wget -O "${SQ_EXTENSIONS_DIR}/plugins/sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
Expand Down
2 changes: 1 addition & 1 deletion dev/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -eu

export SONAR_SCALA_VERSION=8.7.0+21-736a5867+20211215-1535-SNAPSHOT
export SONAR_SCALA_VERSION=8.9.0+5-1ab816ae-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} .
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

services:
sonarqube:
image: sonarqube:8.7.1-community
image: sonarqube:9.4.0-community
ports:
- "80:9000"
networks:
Expand All @@ -22,7 +22,7 @@ services:
- db
entrypoint: ["bash", "-c", "rm lib/extensions/sonar-scala*; bin/run.sh"]
db:
image: postgres:12.6-alpine
image: postgres:13-alpine
networks:
- sonarnet
environment:
Expand Down
17 changes: 12 additions & 5 deletions vars.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"current": {
"version": "5.7.0",
"sonar": "8.7.1",
"sonarDocs": "https://docs.sonarqube.org/8.7",
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16540",
"sonarScala": "8.7.0"
"version": "6.0.0",
"sonar": "9.4.0",
"sonarDocs": "https://docs.sonarqube.org/9.4",
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=17167",
"sonarScala": "9.0.0"
},
"lts": {
"version": "5.8.0",
Expand All @@ -29,6 +29,13 @@
},
"versions": {
"current": [
{
"version": "5.7.0",
"sonar": "8.7.1",
"sonarDocs": "https://docs.sonarqube.org/8.7",
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16540",
"sonarScala": "8.7.0"
},
{
"version": "5.6.0",
"sonar": "8.5.1",
Expand Down

0 comments on commit a78df75

Please sign in to comment.