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

Commit 1f99f58

Browse files
committed
Upgrade sonar-scala to 7.0.0 & SonarQube to 7.3.
1 parent dd56da7 commit 1f99f58

File tree

8 files changed

+106
-30
lines changed

8 files changed

+106
-30
lines changed

3.0.0-full/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SonarQube 7.3 image with bundled sonar-scala 7.0.0 (https://github.com/mwz/sonar-scala).
2+
3+
FROM mwizner/sonarqube:7.3-alpine
4+
5+
ENV SONAR_SCALA_VERSION 7.0.0
6+
7+
WORKDIR /opt/sonarqube/extensions/plugins
8+
RUN wget -O "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
9+
"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"
10+
11+
WORKDIR $SONARQUBE_HOME
12+
ENTRYPOINT ["./bin/run.sh"]

3.0.0/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Alpine image with bundled sonar-scala 7.0.0 (https://github.com/mwz/sonar-scala),
2+
# which can be mounted as a volume into a SonarQube container.
3+
4+
FROM alpine:3.7
5+
6+
ENV SONAR_SCALA_VERSION 7.0.0
7+
8+
RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/v3.7/community wget ca-certificates
9+
10+
WORKDIR /opt/sonarqube/extensions/plugins
11+
RUN wget -O "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
12+
"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"

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![GitHub version](https://img.shields.io/github/tag/mwz/sonarqube-scala-docker.svg?label=release)](https://github.com/mwz/sonarqube-scala-docker/releases)
33
[![Docker Pulls](https://img.shields.io/docker/pulls/mwizner/sonarqube-scala-plugins.svg)](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
44

5-
A docker-compose recipe for out-of-the-box [SonarQube LTS](https://www.sonarqube.org) 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). :sunglasses:
5+
A docker-compose recipe for out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.3](https://www.sonarqube.org/sonarqube-7-3) 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). :sunglasses:
66

77

88
## Usage
@@ -14,7 +14,7 @@ docker-compose up -d
1414

1515
Once docker pulls all the required images and starts up the containers, the application should become available on [http://localhost](http://localhost). The default SonarQube login details for the Administrator account are `admin:admin`.
1616

17-
You can also use a standalone docker image which contains SonarQube LTS with bundled Scala plugins [`mwizner/sonarqube-scala-plugins:2.9.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
17+
You can also use a standalone docker image which contains SonarQube with bundled Scala plugins [`mwizner/sonarqube-scala-plugins:3.0.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
1818

1919
To start the container issue the following command:
2020
```bash
@@ -23,13 +23,13 @@ docker run -d --name sonarqube-scala-plugins-full \
2323
-e SONARQUBE_JDBC_USERNAME=sonar \
2424
-e SONARQUBE_JDBC_PASSWORD=sonar \
2525
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
26-
mwizner/sonarqube-scala-plugins:2.9.0-full
26+
mwizner/sonarqube-scala-plugins:3.0.0-full
2727
```
2828
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQube will use an embedded H2 database, which is not recommended in production.
2929

3030

3131
## Dependencies
32-
* [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube)
32+
* [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) / [SonarQube 7.3](https://hub.docker.com/r/mwizner/sonarqube/tags)
3333
* [PostgreSQL 10](https://hub.docker.com/_/postgres)
3434
* [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle, scoverage and scapegoat.
3535
* versions before `2.7.0` used [arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) for scapegoat support.
@@ -38,6 +38,7 @@ Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQu
3838
## Compatibility Matrix
3939
Version | SonarQube | sonar-scala | sonar-scala-extra
4040
--------|-----------|-------------|------------------
41+
[3.0.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.0.0) | 7.3 ([documentation](https://docs.sonarqube.org/display/SONARQUBE73/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14464)) | [7.0.0](https://github.com/mwz/sonar-scala/releases/tag/v7.0.0) |
4142
[2.9.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.9.0) | 6.7.5 LTS ([documentation](https://docs.sonarqube.org/display/SONARQUBE67/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14467)) | [6.6.0](https://github.com/mwz/sonar-scala/releases/tag/v6.6.0) |
4243
[2.8.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.8.0) | 6.7.5 LTS ([documentation](https://docs.sonarqube.org/display/SONARQUBE67/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14467)) | [6.5.1](https://github.com/mwz/sonar-scala/releases/tag/v6.5.1) |
4344
[2.7.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.7.0) | 6.7.4 LTS ([documentation](https://docs.sonarqube.org/display/SONARQUBE67/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14377)) | [6.5.0](https://github.com/mwz/sonar-scala/releases/tag/v6.5.0) |
@@ -57,6 +58,7 @@ Please note, that starting from version `2.7.0`, the images no longer contain th
5758

5859

5960
## Changelog
61+
- **3.0.0** - Upgraded sonar-scala to 7.0.0 & SonarQube to 7.3.
6062
- **2.9.0** - Upgraded sonar-scala to 6.6.0.
6163
- **2.8.0** - Upgraded sonar-scala to 6.5.1 & SonarQube to 6.7.5.
6264
- **2.7.0** - Upgraded sonar-scala to 6.5.0, which brings support for scapegoat.

README_DOCKERHUB.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
Docker images with out-of-the-box [SonarQube LTS](https://www.sonarqube.org) 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).
1+
Docker images with out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.3](https://www.sonarqube.org/sonarqube-7-3) 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).
22

33

44
## Available versions
55
There are two types of images available: images with [sonar-scala](https://github.com/mwz/sonar-scala) plugin, which can be mounted as a volume into a SonarQube container and images which bundle sonar-scala plugin with SonarQube (suffixed with `-full`).
66

77
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.
88

9-
- `2.9.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.9.0/Dockerfile), [(v2.9.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.9.0)
9+
- `3.0.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.0.0/Dockerfile), [(v3.0.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.0.0)
10+
- `3.0.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.0.0-full/Dockerfile), [(v3.0.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.0.0)
11+
- `2.9.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.9.0/Dockerfile), [(v2.9.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.9.0)
1012
- `2.9.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.9.0-full/Dockerfile), [(v2.9.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.9.0)
11-
- `2.8.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.8.0/Dockerfile), [(v2.8.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.8.0)
13+
- `2.8.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.8.0/Dockerfile), [(v2.8.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.8.0)
1214
- `2.8.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.8.0-full/Dockerfile), [(v2.8.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.8.0)
13-
- `2.7.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.7.0/Dockerfile), [(v2.7.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.7.0)
15+
- `2.7.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.7.0/Dockerfile), [(v2.7.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.7.0)
1416
- `2.7.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.7.0-full/Dockerfile), [(v2.7.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.7.0)
1517
- `2.6.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.6.0/Dockerfile), [(v2.6.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.6.0)
1618
- `2.6.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.6.0-full/Dockerfile), [(v2.6.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.6.0)
@@ -31,25 +33,27 @@ Starting from version `2.7.0`, the images no longer contain the [sonar-scala-ext
3133
## What's included
3234
Version | SonarQube | sonar-scala | sonar-scala-extra
3335
--------|-----------|-------------|------------------
34-
2.9.0 | | 6.6.0 |
35-
2.9.0-full | 6.7.5 LTS | 6.6.0 |
36-
2.8.0 | | 6.5.1 |
37-
2.8.0-full | 6.7.5 LTS | 6.5.1 |
38-
2.7.0 | | 6.5.0 |
39-
2.7.0-full | 6.7.4 LTS | 6.5.0 |
40-
2.6.0 | | 6.4.0 | 1.3.0
36+
3.0.0 || 7.0.0
37+
3.0.0-full | 7.3 | 7.0.0
38+
2.9.0 || 6.6.0
39+
2.9.0-full | 6.7.5 LTS | 6.6.0
40+
2.8.0 || 6.5.1
41+
2.8.0-full | 6.7.5 LTS | 6.5.1
42+
2.7.0 || 6.5.0
43+
2.7.0-full | 6.7.4 LTS | 6.5.0
44+
2.6.0 || 6.4.0 | 1.3.0
4145
2.6.0-full | 6.7.4 LTS | 6.4.0 | 1.3.0
42-
2.5.0 | | 6.4.0 | 1.3.0
46+
2.5.0 || 6.4.0 | 1.3.0
4347
2.5.0-full | 6.7.3 LTS | 6.4.0 | 1.3.0
44-
2.4.0 | | 6.3.0 | 1.3.0
48+
2.4.0 || 6.3.0 | 1.3.0
4549
2.4.0-full | 6.7.3 LTS | 6.3.0 | 1.3.0
46-
2.3.0 | | 6.2.0 | 1.3.0
50+
2.3.0 || 6.2.0 | 1.3.0
4751
2.3.0-full | 6.7.3 LTS | 6.2.0 | 1.3.0
48-
2.2.1 | | 6.1.0 | 1.3.0
52+
2.2.1 || 6.1.0 | 1.3.0
4953
2.2.1-full | 6.7.3 LTS | 6.1.0 | 1.3.0
50-
2.2.0 | | 6.1.0 | 1.3.0
54+
2.2.0 || 6.1.0 | 1.3.0
5155
2.2.0-full | 6.7.2 LTS | 6.1.0 | 1.3.0
52-
2.1.0 | | 6.0.0 | 1.3.0
56+
2.1.0 || 6.0.0 | 1.3.0
5357
2.1.0-full | 6.7.1 LTS | 6.0.0 | 1.3.0
5458

5559

@@ -60,7 +64,7 @@ version: "2"
6064
6165
services:
6266
sonarqube:
63-
image: sonarqube:6.7.5-alpine # lts
67+
image: mwizner/sonarqube:7.3-alpine
6468
ports:
6569
- "80:9000"
6670
networks:
@@ -69,7 +73,7 @@ services:
6973
- plugins
7074
7175
plugins:
72-
image: mwizner/sonarqube-scala-plugins:2.9.0
76+
image: mwizner/sonarqube-scala-plugins:3.0.0
7377
volumes:
7478
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
7579
command: /bin/true
@@ -91,7 +95,7 @@ docker run -d --name sonarqube-scala-plugins-full \
9195
-e SONARQUBE_JDBC_USERNAME=sonar \
9296
-e SONARQUBE_JDBC_PASSWORD=sonar \
9397
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
94-
mwizner/sonarqube-scala-plugins:2.9.0-full
98+
mwizner/sonarqube-scala-plugins:3.0.0-full
9599
```
96100

97101
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQube will use an embedded H2 database, which is not recommended in production.

dev/build.sh

Lines changed: 1 addition & 1 deletion
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=6.7.0-SNAPSHOT
4+
export SONAR_SCALA_VERSION=7.0.0-SNAPSHOT
55
cp ~/.ivy2/local/com.github.mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/jars/sonar-scala_2.12-assembly.jar .
66
docker build -t mwizner/sonarqube-scala-plugins:dev --build-arg SONAR_SCALA_VERSION=${SONAR_SCALA_VERSION} .

docker-compose-lts.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: "2"
2+
3+
services:
4+
sonarqube:
5+
image: sonarqube:6.7.5-alpine # lts
6+
ports:
7+
- "80:9000"
8+
networks:
9+
- sonarnet
10+
environment:
11+
- SONARQUBE_JDBC_USERNAME=sonar
12+
- SONARQUBE_JDBC_PASSWORD=sonar
13+
- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar
14+
volumes:
15+
- sonarqube_conf:/opt/sonarqube/conf
16+
- sonarqube_data:/opt/sonarqube/data
17+
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
18+
volumes_from:
19+
- plugins
20+
db:
21+
image: postgres:10.5-alpine
22+
networks:
23+
- sonarnet
24+
environment:
25+
- POSTGRES_USER=sonar
26+
- POSTGRES_PASSWORD=sonar
27+
volumes:
28+
- postgresql:/var/lib/postgresql
29+
- postgresql_data:/var/lib/postgresql/data
30+
plugins:
31+
image: mwizner/sonarqube-scala-plugins:2.9.0
32+
volumes:
33+
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
34+
command: /bin/true
35+
36+
networks:
37+
sonarnet:
38+
driver: bridge
39+
40+
volumes:
41+
sonarqube_conf:
42+
sonarqube_data:
43+
sonarqube_bundled-plugins:
44+
sonarqube_plugins:
45+
postgresql:
46+
postgresql_data:

docker-compose.yml

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

33
services:
44
sonarqube:
5-
image: sonarqube:6.7.5-alpine # lts
5+
image: mwizner/sonarqube:7.3-alpine
66
ports:
77
- "80:9000"
88
networks:
@@ -17,7 +17,8 @@ services:
1717
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
1818
volumes_from:
1919
- plugins
20-
20+
depends_on:
21+
- db
2122
db:
2223
image: postgres:10.5-alpine
2324
networks:
@@ -28,9 +29,8 @@ services:
2829
volumes:
2930
- postgresql:/var/lib/postgresql
3031
- postgresql_data:/var/lib/postgresql/data
31-
3232
plugins:
33-
image: mwizner/sonarqube-scala-plugins:2.9.0
33+
image: mwizner/sonarqube-scala-plugins:3.0.0
3434
volumes:
3535
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
3636
command: /bin/true

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -eu
33

4-
export VERSION=2.9.0
4+
export VERSION=3.0.0
55

66
# Build
77
docker build -t mwizner/sonarqube-scala-plugins:$VERSION -t mwizner/sonarqube-scala-plugins:latest $VERSION

0 commit comments

Comments
 (0)