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

Commit c7ed178

Browse files
committed
Upgrade sonar-scala to 6.5.0.
1 parent 71584ff commit c7ed178

File tree

8 files changed

+51
-18
lines changed

8 files changed

+51
-18
lines changed

2.7.0-full/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SonarQube 6.7.4 LTS image with bundled sonar-scala 6.5.0 (https://github.com/mwz/sonar-scala).
2+
3+
FROM sonarqube:6.7.4-alpine
4+
5+
ENV SONAR_SCALA_VERSION 6.5.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"]

2.7.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 6.5.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 6.5.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: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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.6.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
17+
You can also use a standalone docker image which contains SonarQube LTS with bundled Scala plugins [`mwizner/sonarqube-scala-plugins:2.7.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
1818

1919
To start the container issue the following command:
2020
```bash
@@ -23,21 +23,22 @@ 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.6.0-full
26+
mwizner/sonarqube-scala-plugins:2.7.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

30+
3031
## Dependencies
3132
* [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube)
3233
* [PostgreSQL 10](https://hub.docker.com/_/postgres)
33-
* External SonarQube plugins:
34-
* [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle and scoverage.
35-
* [arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) - adds scapegoat inspections.
34+
* [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle, scoverage and scapegoat.
35+
* versions before `2.7.0` used [arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) for scapegoat support.
3636

3737

3838
## Compatibility Matrix
3939
Version | SonarQube | sonar-scala | sonar-scala-extra
4040
--------|-----------|-------------|------------------
41+
[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) |
4142
[2.6.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.6.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.4.0](https://github.com/mwz/sonar-scala/releases/tag/v6.4.0) | [1.3.0](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v1.3.0)
4243
[2.5.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.5.0) | 6.7.3 LTS ([documentation](https://docs.sonarqube.org/display/SONARQUBE67/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14264)) | [6.4.0](https://github.com/mwz/sonar-scala/releases/tag/v6.4.0) | [1.3.0](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v1.3.0)
4344
[2.4.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.4.0) | 6.7.3 LTS ([documentation](https://docs.sonarqube.org/display/SONARQUBE67/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14264)) | [6.3.0](https://github.com/mwz/sonar-scala/releases/tag/v6.3.0) | [1.3.0](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v1.3.0)
@@ -47,11 +48,14 @@ Version | SonarQube | sonar-scala | sonar-scala-extra
4748
[2.1.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.1.0), [2.0.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.0.0) | 6.7.1 LTS ([documentation](https://docs.sonarqube.org/display/SONARQUBE67/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14137)) | [6.0.0](https://github.com/mwz/sonar-scala/releases/tag/v6.0.0) | [1.3.0](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v1.3.0)
4849
[1.0.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/1.0.0) | 5.6.7 LTS ([documentation](https://docs.sonarqube.org/display/SONARQUBE56/Documentation)) | [0.0.3](https://github.com/Sagacify/sonar-scala/releases/tag/v0.0.3) | [1.3.0](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v1.3.0)
4950

51+
Please note, that 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.
5052

5153
## Recommendations
5254
[sbt-sonar](https://github.com/mwz/sbt-sonar) is an sbt plugin which provides a way to automate analysis of Scala projects with SonarQube.
5355

56+
5457
## Changelog
58+
- **2.7.0** - Upgraded sonar-scala to 6.5.0, which brings support for scapegoat.
5559
- **2.6.0** - Upgraded SonarQube to 6.7.4.
5660
- **2.5.0** - Upgraded sonar-scala to 6.4.0.
5761
- **2.4.0** - Upgraded sonar-scala to 6.3.0.
@@ -62,5 +66,6 @@ Version | SonarQube | sonar-scala | sonar-scala-extra
6266
- **2.0.0** - SonarQube 6.7.1 LTS.
6367
- **1.0.0** - SonarQube 5.6.7 LTS.
6468

69+
6570
## License
6671
The project is licensed under the Apache License v2. See the [LICENSE file](LICENSE) for more details.

README_DOCKERHUB.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
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).
22

3+
34
## Available versions
5+
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`).
46

5-
There are two types of images available: images with [sonar-scala](https://github.com/mwz/sonar-scala) and [sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) plugins, which can be mounted as a volume into a SonarQube container and images which bundle those plugins with SonarQube (suffixed with `-full`).
7+
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.
68

7-
- `2.6.0`, `latest` [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)
9+
- `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)
10+
- `2.7.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.7.0-full/Dockerfile), [(v2.6.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.6.0)
11+
- `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)
812
- `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)
913
- `2.5.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.5.0/Dockerfile), [(v2.5.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.5.0)
1014
- `2.5.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.5.0-full/Dockerfile), [(v2.4.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.5.0)
@@ -19,9 +23,12 @@ There are two types of images available: images with [sonar-scala](https://githu
1923
- `2.1.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.1.0/Dockerfile), [(v2.1.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.1.0)
2024
- `2.1.0-full` ([Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.1.0-full/Dockerfile)), [(v2.1.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.1.0)
2125

26+
2227
## What's included
2328
Version | SonarQube | sonar-scala | sonar-scala-extra
2429
--------|-----------|-------------|------------------
30+
2.7.0 | | 6.5.0 |
31+
2.7.0-full | 6.7.4 LTS | 6.5.0 |
2532
2.6.0 | | 6.4.0 | 1.3.0
2633
2.6.0-full | 6.7.4 LTS | 6.4.0 | 1.3.0
2734
2.5.0 | | 6.4.0 | 1.3.0
@@ -37,6 +44,7 @@ Version | SonarQube | sonar-scala | sonar-scala-extra
3744
2.1.0 | | 6.0.0 | 1.3.0
3845
2.1.0-full | 6.7.1 LTS | 6.0.0 | 1.3.0
3946

47+
4048
## Usage
4149
To use one of the volume images, mount it as a volume to your existing SonarQube container using e.g. `docker-compose`:
4250
```
@@ -53,7 +61,7 @@ services:
5361
- plugins
5462
5563
plugins:
56-
image: mwizner/sonarqube-scala-plugins:2.6.0
64+
image: mwizner/sonarqube-scala-plugins:2.7.0
5765
volumes:
5866
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
5967
command: /bin/true
@@ -75,10 +83,11 @@ docker run -d --name sonarqube-scala-plugins-full \
7583
-e SONARQUBE_JDBC_USERNAME=sonar \
7684
-e SONARQUBE_JDBC_PASSWORD=sonar \
7785
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
78-
mwizner/sonarqube-scala-plugins:2.6.0-full
86+
mwizner/sonarqube-scala-plugins:2.7.0-full
7987
```
8088

8189
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.
8290

91+
8392
## Repository
8493
This project is open-sourced and can be found on [Github](https://github.com/mwz/sonar-scala-docker).

dev/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
# Alpine image with bundled Scala plugins
2-
# sonar-scala (https://github.com/mwz/sonar-scala)
3-
# and sonar-scala-extra (https://github.com/arthepsy/sonar-scala-extra),
1+
# Alpine image with bundled sonar-scala plugin (https://github.com/mwz/sonar-scala),
42
# which can be mounted as a volume into a SonarQube container.
53
# This image is intended to be used for local development purposes.
64

75
FROM alpine:3.7
86

9-
ARG SONAR_SCAPEGOAT_VERSION=1.3.0
107
ARG SONAR_SCALA_VERSION
118

129
RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/v3.7/community wget ca-certificates
1310

1411
WORKDIR /opt/sonarqube/extensions/plugins
15-
RUN wget -O "sonar-scapegoat-plugin-${SONAR_SCAPEGOAT_VERSION}.jar" \
16-
"https://github.com/arthepsy/sonar-scala-extra/releases/download/v${SONAR_SCAPEGOAT_VERSION}/sonar-scapegoat-plugin-${SONAR_SCAPEGOAT_VERSION}.jar"
1712
ADD sonar-scala_2.12-assembly.jar .

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.5.0-SNAPSHOT
4+
export SONAR_SCALA_VERSION=6.6.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.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ services:
3030
- postgresql_data:/var/lib/postgresql/data
3131

3232
plugins:
33-
image: mwizner/sonarqube-scala-plugins:2.6.0
33+
image: mwizner/sonarqube-scala-plugins:2.7.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.6.0
4+
export VERSION=2.7.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)