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 8.3 & sonar-scala to 8.3.0 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwz committed Jun 10, 2020
1 parent b346031 commit c94bc74
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 39 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# sonar-scala-docker

[![GitHub version](<https://img.shields.io/badge/release_(for_SonarQube_8.2)-v5.2.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version](<https://img.shields.io/badge/release_(for_SonarQube_8.3.1)-v5.3.0-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![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)
[![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 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts),
[SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and
[SonarQube 8.2](https://www.sonarqube.org) instance with support
[SonarQube 8.3.1](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) +
Expand All @@ -35,7 +35,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.2.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)(or
[`mwizner/sonarqube-scala-plugins:5.3.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)(or
`mwizner/sonarqube-scala-plugins:latest-full`) and
[`mwizner/sonarqube-scala-plugins:4.2.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 @@ -54,7 +54,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.2.0-full
mwizner/sonarqube-scala-plugins:5.3.0-full
```

Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable,
Expand All @@ -66,14 +66,14 @@ 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.2.0-full
mwizner/sonarqube-scala-plugins:5.3.0-full
```

## Dependencies

- [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) /
[SonarQube 7.9 LTS](https://hub.docker.com/_/sonarqube) /
[SonarQube 8.2](https://hub.docker.com/_/sonarqube)
[SonarQube 8.3.1](https://hub.docker.com/_/sonarqube)
- [PostgreSQL 11](https://hub.docker.com/_/postgres)
- [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for
scalastyle, scoverage and scapegoat
Expand All @@ -87,7 +87,7 @@ scapegoat support)_
<!-- prettier-ignore-start -->
|Version | SonarQube | sonar-scala |
|--------|-----------|-------------|
[5.2.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.2.0) | 8.2 [documentation](https://docs.sonarqube.org/8.2), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15301) | [8.2.0](https://github.com/mwz/sonar-scala/releases/tag/v8.2.0)
[5.3.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.3.0) | 8.3.1 [documentation](https://docs.sonarqube.org/8.3), [changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15640) | [8.3.0](https://github.com/mwz/sonar-scala/releases/tag/v8.3.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) | [7.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)
<!-- prettier-ignore-end -->
Expand All @@ -101,6 +101,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.2.0">5.2.0</a></td>
<td>8.2 <a href="https://docs.sonarqube.org/8.2">documentation</a>, <a href="https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15301">changelog</a></td>
<td><a href="https://github.com/mwz/sonar-scala/releases/tag/v8.2.0">8.2.0</td>
<td></td>
</tr>
<tr>
<td><a href="https://github.com/mwz/sonarqube-scala-docker/releases/tag/5.1.0">5.1.0</a></td>
<td>8.1 <a href="https://docs.sonarqube.org/8.1">documentation</a>, <a href="https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15243">changelog</a></td>
Expand Down
24 changes: 12 additions & 12 deletions README_DOCKERHUB.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Docker images with out-of-the-box
[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts),
[SonarQube 7.9 LTS](https://www.sonarqube.org/sonarqube-7-9-lts) and
[SonarQube 8.2](https://www.sonarqube.org) instance with support
[SonarQube 8.3.1](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)** +
Expand All @@ -18,11 +18,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.2.0`, `latest`
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.2.0/Dockerfile),
`5.2.0-full`, `latest-full`
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.2.0-full/Dockerfile),
[Release 5.2.0](https://github.com/mwz/sonar-scala-docker/releases/tag/5.2.0)
- `5.3.0`, `latest`
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.3.0/Dockerfile),
`5.3.0-full`, `latest-full`
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/5.3.0-full/Dockerfile),
[Release 5.3.0](https://github.com/mwz/sonar-scala-docker/releases/tag/5.3.0)
- `4.2.0`, `latest-lts` (7.9 LTS)
[Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/4.2.0/Dockerfile),
`4.2.0-full`, `latest-lts-full` (7.9 LTS)
Expand All @@ -41,8 +41,8 @@ For older versions please check the

| Version | SonarQube | sonar-scala |
| ------------------------ | ----------------- | ---------------------- |
| 5.2.0 | | 8.2.0 |
| 5.2.0-full | 8.2 | 8.2.0 |
| 5.3.0 | | 8.3.0 |
| 5.3.0-full | 8.3.1 | 8.3.0 |
| 4.2.0 | | 7.9.0 |
| 4.2.0-full | 7.9.1 LTS | 7.9.0 |
| 2.12.0 | | 6.8.0 |
Expand All @@ -58,7 +58,7 @@ version: "2"
services:
sonarqube:
image: sonarqube:8.2-community
image: sonarqube:8.3.1-community
ports:
- "80:9000"
networks:
Expand All @@ -67,7 +67,7 @@ services:
- plugins
plugins:
image: mwizner/sonarqube-scala-plugins:5.2.0
image: mwizner/sonarqube-scala-plugins:5.3.0
volumes:
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
command: /bin/true
Expand Down Expand Up @@ -95,7 +95,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.2.0-full
mwizner/sonarqube-scala-plugins:5.3.0-full
```

Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable,
Expand All @@ -107,7 +107,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.2.0-full
mwizner/sonarqube-scala-plugins:5.3.0-full
```

## Repository
Expand Down
16 changes: 10 additions & 6 deletions current/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
FROM bitnami/minideb:stretch
RUN install_packages curl ca-certificates

ENV SONAR_SCALA_VERSION 8.2.0
ENV SONAR_SCALA_VERSION 8.3.0
ENV GIT_PLUGIN_VERSION 1.11.1.2008
ENV SQ_EXTENSIONS_DIR "/opt/sonarqube/extensions"

RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube
WORKDIR /opt/sonarqube/extensions/plugins
RUN curl -L -o "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
"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"
RUN chown -R sonarqube:sonarqube /opt/sonarqube
RUN groupadd -g 1000 -r sonarqube && useradd -r -g sonarqube sonarqube
RUN curl --create-dirs -L -o "${SQ_EXTENSIONS_DIR}/plugins/sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
"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" && \
curl --create-dirs -L -o "${SQ_EXTENSIONS_DIR}/plugins/sonar-scm-git-plugin-${GIT_PLUGIN_VERSION}.jar" \
"https://repo1.maven.org/maven2/org/sonarsource/scm/git/sonar-scm-git-plugin/${GIT_PLUGIN_VERSION}/sonar-scm-git-plugin-${GIT_PLUGIN_VERSION}.jar" && \
chown -R sonarqube:sonarqube /opt/sonarqube && \
chmod 777 $SQ_EXTENSIONS_DIR/plugins/*
14 changes: 8 additions & 6 deletions current/full/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# SonarQube 8.2 image with bundled sonar-scala (https://github.com/mwz/sonar-scala).
# SonarQube 8.3 image with bundled sonar-scala (https://github.com/mwz/sonar-scala).

FROM sonarqube:8.2-community
FROM sonarqube:8.3.1-community

ENV SONAR_SCALA_VERSION 8.2.0
ENV SONAR_SCALA_VERSION 8.3.0

WORKDIR /opt/sonarqube/extensions/plugins
RUN rm sonar-scala-plugin-* && curl -L -o "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
"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"
RUN rm $SQ_EXTENSIONS_DIR/plugins/sonar-scala-plugin-* && \
wget -O "${SQ_EXTENSIONS_DIR}/plugins/sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
"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" && \
chown sonarqube:sonarqube $SQ_EXTENSIONS_DIR/plugins/sonar-scala-plugin-* && \
chmod 777 $SQ_EXTENSIONS_DIR/plugins/sonar-scala-plugin-*

WORKDIR $SONARQUBE_HOME
ENTRYPOINT ["./bin/run.sh"]
2 changes: 1 addition & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ FROM bitnami/minideb:stretch

ARG SONAR_SCALA_VERSION

RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube
RUN groupadd -g 1000 -r sonarqube && useradd -r -g sonarqube sonarqube
ADD --chown=sonarqube:sonarqube sonar-scala_2.13-assembly.jar /opt/sonarqube/extensions/plugins/sonar-scala_2.13-assembly.jar
WORKDIR /opt/sonarqube/extensions/plugins
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.3.0-SNAPSHOT
export SONAR_SCALA_VERSION=8.4.0-SNAPSHOT
cp ~/.ivy2/local/com.github.mwz/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} .
2 changes: 1 addition & 1 deletion 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.2-community
image: sonarqube:8.3.1-community
ports:
- "80:9000"
networks:
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.2.0",
"sonar": "8.2",
"sonarDocs": "https://docs.sonarqube.org/8.2",
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15301",
"sonarScala": "8.2.0"
"version": "5.3.0",
"sonar": "8.3.1",
"sonarDocs": "https://docs.sonarqube.org/8.3",
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15640",
"sonarScala": "8.3.0"
},
"lts": {
"version": "4.2.0",
Expand All @@ -22,6 +22,13 @@
},
"versions": {
"current": [
{
"version": "5.2.0",
"sonar": "8.2",
"sonarDocs": "https://docs.sonarqube.org/8.2",
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?projectId=10930&version=15301",
"sonarScala": "8.2.0"
},
{
"version": "5.1.0",
"sonar": "8.1",
Expand Down

0 comments on commit c94bc74

Please sign in to comment.