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 6.7.4 & PostgreSQL to 10.4 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
BalmungSan authored and mwz committed Jun 15, 2018
1 parent 951a0d9 commit 71584ff
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 16 deletions.
17 changes: 17 additions & 0 deletions 2.6.0-full/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SonarQube 6.7.4 LTS image with bundled Scala plugins
# sonar-scala 6.4.0 (https://github.com/mwz/sonar-scala)
# and sonar-scala-extra 1.3.0 (https://github.com/arthepsy/sonar-scala-extra).

FROM sonarqube:6.7.4-alpine

ENV SONAR_SCAPEGOAT_VERSION 1.3.0
ENV SONAR_SCALA_VERSION 6.4.0

WORKDIR /opt/sonarqube/extensions/plugins
RUN wget -O "sonar-scapegoat-plugin-${SONAR_SCAPEGOAT_VERSION}.jar" \
"https://github.com/arthepsy/sonar-scala-extra/releases/download/v${SONAR_SCAPEGOAT_VERSION}/sonar-scapegoat-plugin-${SONAR_SCAPEGOAT_VERSION}.jar"
RUN wget -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"]
17 changes: 17 additions & 0 deletions 2.6.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Alpine image with bundled Scala plugins
# sonar-scala 6.4.0 (https://github.com/mwz/sonar-scala)
# and sonar-scala-extra 1.3.0 (https://github.com/arthepsy/sonar-scala-extra),
# which can be mounted as a volume into a SonarQube container.

FROM alpine:3.7

ENV SONAR_SCAPEGOAT_VERSION 1.3.0
ENV SONAR_SCALA_VERSION 6.4.0

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

WORKDIR /opt/sonarqube/extensions/plugins
RUN wget -O "sonar-scapegoat-plugin-${SONAR_SCAPEGOAT_VERSION}.jar" \
"https://github.com/arthepsy/sonar-scala-extra/releases/download/v${SONAR_SCAPEGOAT_VERSION}/sonar-scapegoat-plugin-${SONAR_SCAPEGOAT_VERSION}.jar"
RUN wget -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"
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ docker-compose up -d

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`.

You can also use a standalone docker image which contains SonarQube LTS with bundled Scala plugins [`mwizner/sonarqube-scala-plugins:2.5.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
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).

To start the container issue the following command:
```bash
Expand All @@ -23,13 +23,13 @@ docker run -d --name sonarqube-scala-plugins-full \
-e SONARQUBE_JDBC_USERNAME=sonar \
-e SONARQUBE_JDBC_PASSWORD=sonar \
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
mwizner/sonarqube-scala-plugins:2.5.0-full
mwizner/sonarqube-scala-plugins:2.6.0-full
```
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.

## Dependencies
* [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube)
* [PostgreSQL 10.2](https://hub.docker.com/_/postgres)
* [PostgreSQL 10](https://hub.docker.com/_/postgres)
* External SonarQube plugins:
* [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle and scoverage.
* [arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) - adds scapegoat inspections.
Expand All @@ -38,6 +38,7 @@ Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQu
## Compatibility Matrix
Version | SonarQube | sonar-scala | sonar-scala-extra
--------|-----------|-------------|------------------
[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)
[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)
[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)
[2.3.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/2.3.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.2.0](https://github.com/mwz/sonar-scala/releases/tag/v6.2.0) | [1.3.0](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v1.3.0)
Expand All @@ -51,6 +52,7 @@ Version | SonarQube | sonar-scala | sonar-scala-extra
[sbt-sonar](https://github.com/mwz/sbt-sonar) is an sbt plugin which provides a way to automate analysis of Scala projects with SonarQube.

## Changelog
- **2.6.0** - Upgraded SonarQube to 6.7.4.
- **2.5.0** - Upgraded sonar-scala to 6.4.0.
- **2.4.0** - Upgraded sonar-scala to 6.3.0.
- **2.3.0** - Upgraded sonar-scala to 6.2.0.
Expand Down
21 changes: 12 additions & 9 deletions README_DOCKERHUB.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ Docker images with out-of-the-box [SonarQube LTS](https://www.sonarqube.org) ins

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`).

- `2.5.0`, `latest` [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)
- `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.4.0)
- `2.4.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.4.0/Dockerfile), [(v2.4.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.4.0)
- `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)
- `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)
- `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)
- `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)
- `2.4.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.4.0/Dockerfile), [(v2.4.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.4.0)
- `2.4.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.4.0-full/Dockerfile), [(v2.4.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.4.0)
- `2.3.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.3.0/Dockerfile), [(v2.3.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.3.0)
- `2.3.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.3.0/Dockerfile), [(v2.3.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.3.0)
- `2.3.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.3.0-full/Dockerfile), [(v2.3.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.3.0)
- `2.2.1`, [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.1/Dockerfile), [(v2.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.1)
- `2.2.1` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.1/Dockerfile), [(v2.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.1)
- `2.2.1-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.1-full/Dockerfile), [(v2.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.1)
- `2.2.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.0/Dockerfile), [(v2.2.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.0)
- `2.2.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.0-full/Dockerfile), [(v2.2.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.0)
Expand All @@ -20,6 +22,8 @@ There are two types of images available: images with [sonar-scala](https://githu
## What's included
Version | SonarQube | sonar-scala | sonar-scala-extra
--------|-----------|-------------|------------------
2.6.0 | | 6.4.0 | 1.3.0
2.6.0-full | 6.7.4 LTS | 6.4.0 | 1.3.0
2.5.0 | | 6.4.0 | 1.3.0
2.5.0-full | 6.7.3 LTS | 6.4.0 | 1.3.0
2.4.0 | | 6.3.0 | 1.3.0
Expand All @@ -33,15 +37,14 @@ Version | SonarQube | sonar-scala | sonar-scala-extra
2.1.0 | | 6.0.0 | 1.3.0
2.1.0-full | 6.7.1 LTS | 6.0.0 | 1.3.0


## Usage
To use one of the volume images, mount it as a volume to your existing SonarQube container using e.g. `docker-compose`:
```
version: "2"
services:
sonarqube:
image: sonarqube:6.7.3-alpine # lts
image: sonarqube:6.7.4-alpine # lts
ports:
- "80:9000"
networks:
Expand All @@ -50,7 +53,7 @@ services:
- plugins
plugins:
image: mwizner/sonarqube-scala-plugins:2.5.0
image: mwizner/sonarqube-scala-plugins:2.6.0
volumes:
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
command: /bin/true
Expand All @@ -72,7 +75,7 @@ docker run -d --name sonarqube-scala-plugins-full \
-e SONARQUBE_JDBC_USERNAME=sonar \
-e SONARQUBE_JDBC_PASSWORD=sonar \
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
mwizner/sonarqube-scala-plugins:2.5.0-full
mwizner/sonarqube-scala-plugins:2.6.0-full
```

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.
Expand Down
6 changes: 3 additions & 3 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:6.7.3-alpine # lts
image: sonarqube:6.7.4-alpine # lts
ports:
- "80:9000"
networks:
Expand All @@ -19,7 +19,7 @@ services:
- plugins

db:
image: postgres:10.2-alpine
image: postgres:10.4-alpine
networks:
- sonarnet
environment:
Expand All @@ -30,7 +30,7 @@ services:
- postgresql_data:/var/lib/postgresql/data

plugins:
image: mwizner/sonarqube-scala-plugins:2.5.0
image: mwizner/sonarqube-scala-plugins:2.6.0
volumes:
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
command: /bin/true
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eu

export VERSION=2.5.0
export VERSION=2.6.0

# Build
docker build -t mwizner/sonarqube-scala-plugins:$VERSION -t mwizner/sonarqube-scala-plugins:latest $VERSION
Expand Down

0 comments on commit 71584ff

Please sign in to comment.