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

Commit 8c0b79b

Browse files
authored
Upgrade SonarQube to 8.7.1 & sonar-scala to 8.7.0 (#31)
1 parent 5c3deed commit 8c0b79b

File tree

10 files changed

+81
-49
lines changed

10 files changed

+81
-49
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
jobs:
5+
test:
6+
name: Test
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Docker build
11+
run: |
12+
export VERSION=`jq -r '.current.version' vars.json`
13+
docker build -t mwizner/sonarqube-scala-plugins:$VERSION current
14+
docker build -t mwizner/sonarqube-scala-plugins:$VERSION-full current/full
15+
- name: Docker build LTS
16+
run: |
17+
export VERSION_LTS=`jq -r '.lts.version' vars.json`
18+
docker build -t mwizner/sonarqube-scala-plugins:$VERSION_LTS lts
19+
docker build -t mwizner/sonarqube-scala-plugins:$VERSION_LTS-full lts/full

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# sonar-scala-docker
22

3-
[![GitHub version](<https://img.shields.io/badge/release_(for_SonarQube_8.5.1)-v5.6.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
3+
[![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)
44
[![GitHub version lts](<https://img.shields.io/badge/release_(for_SonarQube_LTS_7.9)-v4.2.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
55
[![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)
66
[![Docker Pulls](https://img.shields.io/docker/pulls/mwizner/sonarqube-scala-plugins.svg)](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
77

88
Docker images and docker-compose recipes for out-of-the-box
99
[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts),
1010
[SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and
11-
[SonarQube 8.5.1](https://www.sonarqube.org) instance with support
11+
[SonarQube 8.7.1](https://www.sonarqube.org) instance with support
1212
for [Scala](http://www.scala-lang.org),
1313
[Scoverage](https://github.com/scoverage/scalac-scoverage-plugin) (code coverage
1414
metrics) and [Scalastyle](http://www.scalastyle.org) +
@@ -35,7 +35,7 @@ default SonarQube login details for the Administrator account are `admin:admin`.
3535

3636
You can also use a standalone docker image which contains SonarQube server with
3737
bundled sonar-scala plugin,
38-
[`mwizner/sonarqube-scala-plugins:5.6.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)(or
38+
[`mwizner/sonarqube-scala-plugins:5.7.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)(or
3939
`mwizner/sonarqube-scala-plugins:latest-full`) and
4040
[`mwizner/sonarqube-scala-plugins:4.2.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
4141
(or `mwizner/sonarqube-scala-plugins:latest-lts-full`) for the current LTS
@@ -54,7 +54,7 @@ docker run -d \
5454
-e SONARQUBE_JDBC_USERNAME=sonar \
5555
-e SONARQUBE_JDBC_PASSWORD=sonar \
5656
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
57-
mwizner/sonarqube-scala-plugins:5.6.0-full
57+
mwizner/sonarqube-scala-plugins:5.7.0-full
5858
```
5959

6060
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable,
@@ -66,14 +66,14 @@ want to try the image, you can use the following command:
6666
docker run -d \
6767
--name sonarqube-scala-plugins-full \
6868
-p 80:9000 \
69-
mwizner/sonarqube-scala-plugins:5.6.0-full
69+
mwizner/sonarqube-scala-plugins:5.7.0-full
7070
```
7171

7272
## Dependencies
7373

7474
- [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) /
7575
[SonarQube 7.9 LTS](https://hub.docker.com/_/sonarqube) /
76-
[SonarQube 8.5.1](https://hub.docker.com/_/sonarqube)
76+
[SonarQube 8.7.1](https://hub.docker.com/_/sonarqube)
7777
- [PostgreSQL 12](https://hub.docker.com/_/postgres)
7878
- [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for
7979
scalastyle, scoverage and scapegoat
@@ -87,7 +87,7 @@ scapegoat support)_
8787
<!-- prettier-ignore-start -->
8888
|Version | SonarQube | sonar-scala |
8989
|--------|-----------|-------------|
90-
[5.6.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.6.0) | 8.5.1 [documentation](https://docs.sonarqube.org/8.5), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16342) | [8.6.0](https://github.com/mwz/sonar-scala/releases/tag/v8.6.0)
90+
[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)
9191
[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)
9292
[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)
9393
<!-- prettier-ignore-end -->
@@ -101,6 +101,12 @@ scapegoat support)_
101101
<td><b>sonar-scala</b></td>
102102
<td><b>sonar-scala-extra</b></td>
103103
</tr>
104+
<tr>
105+
<td><a href="https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.6.0">5.6.0</a></td>
106+
<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>
107+
<td><a href="https://github.com/mwz/sonar-scala/releases/tag/v8.6.0">8.6.0</td>
108+
<td></td>
109+
</tr>
104110
<tr>
105111
<td><a href="https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.5.0">5.5.0</a></td>
106112
<td>8.4.2 <a href="https://docs.sonarqube.org/8.4">documentation</a>, <a href="https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15833">changelog</a></td>
@@ -299,6 +305,7 @@ way to automate analysis of Scala projects with SonarQube.
299305
<details>
300306
<summary>Expand to see the changelog.</summary>
301307
<ul>
308+
<li><strong>5.7.0</strong> - Upgraded sonar-scala to 8.7.0 & SonarQube to 8.7.1.</li>
302309
<li><strong>5.6.0</strong> - Upgraded sonar-scala to 8.6.0 & SonarQube to 8.5.1.</li>
303310
<li><strong>5.5.0</strong> - Upgraded sonar-scala to 8.5.0 & SonarQube to 8.4.</li>
304311
<li><strong>5.4.0</strong> - Upgraded sonar-scala to 8.4.0.</li>

README.tpl.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ way to automate analysis of Scala projects with SonarQube.
135135
<details>
136136
<summary>Expand to see the changelog.</summary>
137137
<ul>
138+
<li><strong>5.7.0</strong> - Upgraded sonar-scala to 8.7.0 & SonarQube to 8.7.1.</li>
138139
<li><strong>5.6.0</strong> - Upgraded sonar-scala to 8.6.0 & SonarQube to 8.5.1.</li>
139140
<li><strong>5.5.0</strong> - Upgraded sonar-scala to 8.5.0 & SonarQube to 8.4.</li>
140141
<li><strong>5.4.0</strong> - Upgraded sonar-scala to 8.4.0.</li>

README_DOCKERHUB.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Docker images with out-of-the-box
22
[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts),
33
[SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and
4-
[SonarQube 8.5.1](https://www.sonarqube.org) instance with support
4+
[SonarQube 8.7.1](https://www.sonarqube.org) instance with support
55
for **[Scala](http://www.scala-lang.org)**,
66
**[Scoverage](https://github.com/scoverage/scalac-scoverage-plugin)** (code
77
coverage metrics) and **[Scalastyle](http://www.scalastyle.org)** +
@@ -18,11 +18,11 @@ Starting from version `2.7.0`, the images no longer contain the
1818
[sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) plugin as
1919
sonar-scala provides Scapegoat support from version `6.5.0` onwards.
2020

21-
- `5.6.0`, `latest`
22-
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.6.0/Dockerfile),
23-
`5.6.0-full`, `latest-full`
24-
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.6.0-full/Dockerfile),
25-
[Release 5.6.0](https://github.com/mwz/sonar-scala-docker/releases/tag/5.6.0)
21+
- `5.7.0`, `latest`
22+
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.7.0/Dockerfile),
23+
`5.7.0-full`, `latest-full`
24+
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.7.0-full/Dockerfile),
25+
[Release 5.7.0](https://github.com/mwz/sonar-scala-docker/releases/tag/5.7.0)
2626
- `4.2.0`, `latest-lts` (7.9 LTS)
2727
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/4.2.0/Dockerfile),
2828
`4.2.0-full`, `latest-lts-full` (7.9 LTS)
@@ -41,8 +41,8 @@ For older versions please check the
4141

4242
| Version | SonarQube | sonar-scala |
4343
| ------------------------ | ----------------- | ---------------------- |
44-
| 5.6.0 | | 8.6.0 |
45-
| 5.6.0-full | 8.5.1 | 8.6.0 |
44+
| 5.7.0 | | 8.7.0 |
45+
| 5.7.0-full | 8.7.1 | 8.7.0 |
4646
| 4.2.0 | | 7.9.0 |
4747
| 4.2.0-full | 7.9.1 LTS | 7.9.0 |
4848
| 2.12.0 | | 6.8.0 |
@@ -58,7 +58,7 @@ version: "2"
5858
5959
services:
6060
sonarqube:
61-
image: sonarqube:8.5.1-community
61+
image: sonarqube:8.7.1-community
6262
ports:
6363
- "80:9000"
6464
networks:
@@ -67,7 +67,7 @@ services:
6767
- plugins
6868
6969
plugins:
70-
image: mwizner/sonarqube-scala-plugins:5.6.0
70+
image: mwizner/sonarqube-scala-plugins:5.7.0
7171
volumes:
7272
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
7373
command: /bin/true
@@ -95,7 +95,7 @@ docker run -d \
9595
-e SONARQUBE_JDBC_USERNAME=sonar \
9696
-e SONARQUBE_JDBC_PASSWORD=sonar \
9797
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
98-
mwizner/sonarqube-scala-plugins:5.6.0-full
98+
mwizner/sonarqube-scala-plugins:5.7.0-full
9999
```
100100

101101
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable,
@@ -107,7 +107,7 @@ want to try the image, you can use the following command:
107107
docker run -d \
108108
--name sonarqube-scala-plugins-full \
109109
-p 80:9000 \
110-
mwizner/sonarqube-scala-plugins:5.6.0-full
110+
mwizner/sonarqube-scala-plugins:5.7.0-full
111111
```
112112

113113
## Repository

conf/sonar.properties

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@
3737
# A database named sonar must exist and its collation must be case-sensitive (CS) and accent-sensitive (AS)
3838
# Use the following connection string if you want to use integrated security with Microsoft Sql Server
3939
# Do not set sonar.jdbc.username or sonar.jdbc.password property if you are using Integrated Security
40-
# For Integrated Security to work, you have to download the Microsoft SQL JDBC driver package from
41-
# https://www.microsoft.com/en-us/download/details.aspx?id=55539
42-
# and copy sqljdbc_auth.dll to your path. You have to copy the 32 bit or 64 bit version of the dll
43-
# depending upon the architecture of your server machine.
40+
# For Integrated Security to work, you have to download the Microsoft SQL JDBC Driver 9.2.0 package from
41+
# https://docs.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver15#92
42+
# and copy mssql-jdbc_auth-9.2.0.x64.dll to your path.
4443
#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true
4544

4645
# Use the following connection string if you want to use SQL Auth while connecting to MS Sql Server.
@@ -242,7 +241,8 @@
242241
#--------------------------------------------------------------------------------------------------
243242
# ELASTICSEARCH
244243
# Elasticsearch is used to facilitate fast and accurate information retrieval.
245-
# It is executed in a dedicated Java process. Default heap size is 512MB.
244+
# It is executed in a dedicated Java process. Default maximum heap size is 512MB.
245+
# It is recommended to also set MaxDirectMemorySize (-XX:MaxDirectMemorySize) and set it to half the maximum heap size.
246246
#
247247
# --------------------------------------------------
248248
# Word of caution for Linux users on 64bits systems
@@ -256,15 +256,19 @@
256256
#
257257

258258
# JVM options of Elasticsearch process
259-
#sonar.search.javaOpts=-Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError
259+
#sonar.search.javaOpts=-Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError
260260

261261
# Same as previous property, but allows to not repeat all other settings like -Xmx
262262
#sonar.search.javaAdditionalOpts=
263263

264-
# Elasticsearch port. Default is 9001. Use 0 to get a free port.
264+
# Elasticsearch port for incoming HTTP connections. Default is 9001. Use 0 to get a free port.
265265
# As a security precaution, should be blocked by a firewall and not exposed to the Internet.
266266
#sonar.search.port=9001
267267

268+
# Elasticsearch TCP transport port that is bound to loopback address. When nothing is set, a random port will be chosen.
269+
# As a security precaution, your OS configuration should not expose this port for external access.
270+
#sonar.es.port=
271+
268272
# Elasticsearch host. The search server will bind this address and the search client will connect to it.
269273
# Default is loopback address.
270274
# As a security precaution, should NOT be set to a publicly available address.
@@ -311,8 +315,9 @@
311315
# Compute Engine (aka. CE) logs in ce.log
312316
# Elasticsearch (aka. ES) logs in es.log
313317
#
314-
# All 4 files follow the same rolling policy (see sonar.log.rollingPolicy and sonar.log.maxFiles) but it applies
318+
# Depending on the startup, all 4 files follow the same rolling policy (see sonar.log.rollingPolicy and sonar.log.maxFiles) but it applies
315319
# individually (eg. if sonar.log.maxFiles=4, there can be at most 4 of each files, ie. 16 files in total).
320+
# 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
316321
#
317322
# All 4 files have logs in the same format:
318323
# 1 2 3 4 5 6
@@ -400,10 +405,3 @@
400405
# We don't collect source code or IP addresses. And we don't share the data with anyone else.
401406
# To see an example of the data shared: login as a global administrator, call the WS api/system/info and check the Statistics field.
402407
sonar.telemetry.enable=false
403-
404-
#--------------------------------------------------------------------------------------------------
405-
# DEVELOPMENT - only for developers
406-
# The following properties MUST NOT be used in production environments.
407-
408-
# Elasticsearch HTTP connector
409-
#sonar.search.httpPort=-1

current/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
FROM bitnami/minideb:stretch
55
RUN install_packages curl ca-certificates
66

7-
ENV SONAR_SCALA_VERSION 8.6.0
7+
ENV SONAR_SCALA_VERSION 8.7.0
88
ENV SQ_EXTENSIONS_DIR "/opt/sonarqube/extensions"
99

1010
RUN groupadd -g 1000 -r sonarqube && useradd -r -g sonarqube sonarqube
1111
RUN curl --create-dirs -L -o "${SQ_EXTENSIONS_DIR}/plugins/sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
12-
"https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.13/${SONAR_SCALA_VERSION}/sonar-scala_2.13-${SONAR_SCALA_VERSION}-assembly.jar" && \
12+
"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" && \
1313
chown -R sonarqube:sonarqube /opt/sonarqube && \
1414
chmod 777 $SQ_EXTENSIONS_DIR/plugins/*

current/full/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# SonarQube 8.5 image with bundled sonar-scala (https://github.com/mwz/sonar-scala).
1+
# SonarQube 8.7 image with bundled sonar-scala (https://github.com/mwz/sonar-scala).
22

3-
FROM sonarqube:8.5.1-community
3+
FROM sonarqube:8.7.1-community
44

5-
ENV SONAR_SCALA_VERSION 8.6.0
5+
ENV SONAR_SCALA_VERSION 8.7.0
66

77
RUN rm $SONARQUBE_HOME/lib/extensions/sonar-scala* && \
88
wget -O "${SQ_EXTENSIONS_DIR}/plugins/sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
9-
"https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.13/${SONAR_SCALA_VERSION}/sonar-scala_2.13-${SONAR_SCALA_VERSION}-assembly.jar" && \
9+
"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" && \
1010
chown sonarqube:sonarqube $SQ_EXTENSIONS_DIR/plugins/sonar-scala-plugin-* && \
1111
chmod 777 $SQ_EXTENSIONS_DIR/plugins/sonar-scala-plugin-*
1212

dev/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
set -eu
33

4-
export SONAR_SCALA_VERSION=8.7.0-SNAPSHOT
5-
cp ~/.ivy2/local/com.github.mwz/sonar-scala_2.13/${SONAR_SCALA_VERSION}/jars/sonar-scala_2.13-assembly.jar .
4+
export SONAR_SCALA_VERSION=8.7.0+7-b082d533-SNAPSHOT
5+
cp ~/.ivy2/local/com.sonar-scala/sonar-scala_2.13/${SONAR_SCALA_VERSION}/jars/sonar-scala_2.13-assembly.jar .
66
docker build -t mwizner/sonarqube-scala-plugins:dev --build-arg SONAR_SCALA_VERSION=${SONAR_SCALA_VERSION} .

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "2"
22

33
services:
44
sonarqube:
5-
image: sonarqube:8.5.1-community
5+
image: sonarqube:8.7.1-community
66
ports:
77
- "80:9000"
88
networks:
@@ -22,7 +22,7 @@ services:
2222
- db
2323
entrypoint: ["bash", "-c", "rm lib/extensions/sonar-scala*; bin/run.sh"]
2424
db:
25-
image: postgres:12.5-alpine
25+
image: postgres:12.6-alpine
2626
networks:
2727
- sonarnet
2828
environment:

vars.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"current": {
3-
"version": "5.6.0",
4-
"sonar": "8.5.1",
5-
"sonarDocs": "https://docs.sonarqube.org/8.5",
6-
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16342",
7-
"sonarScala": "8.6.0"
3+
"version": "5.7.0",
4+
"sonar": "8.7.1",
5+
"sonarDocs": "https://docs.sonarqube.org/8.7",
6+
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16540",
7+
"sonarScala": "8.7.0"
88
},
99
"lts": {
1010
"version": "4.2.0",
@@ -22,6 +22,13 @@
2222
},
2323
"versions": {
2424
"current": [
25+
{
26+
"version": "5.6.0",
27+
"sonar": "8.5.1",
28+
"sonarDocs": "https://docs.sonarqube.org/8.5",
29+
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=16342",
30+
"sonarScala": "8.6.0"
31+
},
2532
{
2633
"version": "5.5.0",
2734
"sonar": "8.4.2",

0 commit comments

Comments
 (0)