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

Commit

Permalink
Upgrade sonar-scala to 7.4.0. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwz authored Mar 11, 2019
1 parent b7d321a commit 7d9d1a6
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 21 deletions.
12 changes: 12 additions & 0 deletions 3.5.0-full/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SonarQube 7.6 image with bundled sonar-scala 7.4.0 (https://github.com/mwz/sonar-scala).

FROM sonarqube:7.6-community

ENV SONAR_SCALA_VERSION 7.4.0

WORKDIR /opt/sonarqube/extensions/plugins
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"]
13 changes: 13 additions & 0 deletions 3.5.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Minideb image with bundled sonar-scala 7.4.0 (https://github.com/mwz/sonar-scala),
# which can be mounted as a volume into a SonarQube container.

FROM bitnami/minideb:stretch
RUN install_packages curl ca-certificates

ENV SONAR_SCALA_VERSION 7.4.0

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.12/${SONAR_SCALA_VERSION}/sonar-scala_2.12-${SONAR_SCALA_VERSION}-assembly.jar"
RUN chown -R sonarqube:sonarqube /opt/sonarqube
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# sonar-scala-docker
[![GitHub version](https://img.shields.io/badge/release-v3.4.0-blue.svg)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version](https://img.shields.io/badge/release-v3.5.0-blue.svg)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version lts](https://img.shields.io/badge/release_(LTS)-v2.11.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) and [SonarQube 7.4](https://www.sonarqube.org/sonarqube-7-4) 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:
Docker images and docker-compose recipes for out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.6](https://www.sonarqube.org/sonarqube-7-6) 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:


## Usage
Expand All @@ -19,7 +19,7 @@ docker-compose -f docker-compose-lts.yml 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 server with bundled sonar-scala plugin, [`mwizner/sonarqube-scala-plugins:3.4.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) and [`mwizner/sonarqube-scala-plugins:2.11.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) for the LTS version.
You can also use a standalone docker image which contains SonarQube server with bundled sonar-scala plugin, [`mwizner/sonarqube-scala-plugins:3.5.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) and [`mwizner/sonarqube-scala-plugins:2.11.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) for the LTS version.

To start the container issue the following command:
```bash
Expand All @@ -29,14 +29,14 @@ 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:3.4.0-full
mwizner/sonarqube-scala-plugins:3.5.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, but if you don't have access to an existing database or you just want to try the image, you can use the following command:
```bash
docker run -d \
--name sonarqube-scala-plugins-full \
-p 80:9000 \
mwizner/sonarqube-scala-plugins:3.4.0-full
mwizner/sonarqube-scala-plugins:3.5.0-full
```


Expand All @@ -50,6 +50,7 @@ docker run -d \
## Compatibility Matrix
Version | SonarQube | sonar-scala | sonar-scala-extra
--------|-----------|-------------|------------------
[3.5.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.5.0) | 7.6 ([documentation](https://docs.sonarqube.org/7.6))([changelog](https://jira.sonarsource.com/secure/ReleaseNote.jspa?version=14753&projectId=10930)) | [7.4.0](https://github.com/mwz/sonar-scala/releases/tag/v7.4.0)
[3.4.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.4.0) | 7.4 ([documentation](https://docs.sonarqube.org/7.4))([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549)) | [7.3.1](https://github.com/mwz/sonar-scala/releases/tag/v7.3.1)
[3.3.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.3.0) | 7.4 ([documentation](https://docs.sonarqube.org/7.4))([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549)) | [7.3.0](https://github.com/mwz/sonar-scala/releases/tag/v7.3.0)
[3.2.1](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.2.1) | 7.4 ([documentation](https://docs.sonarqube.org/7.4))([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549)) | [7.2.0](https://github.com/mwz/sonar-scala/releases/tag/v7.2.0)
Expand Down Expand Up @@ -77,6 +78,7 @@ Please note, that starting from version `2.7.0`, the images no longer contain th


## Changelog
- **3.5.0** - Upgraded sonar-scala to 7.4.0 & SonarQube to 7.6.
- **3.4.0** - Upgraded sonar-scala to 7.3.1.
- **3.3.0** - Upgraded sonar-scala to 7.3.0.
- **3.2.1** - Fixed file system permissions.
Expand Down
3 changes: 2 additions & 1 deletion README.tpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![GitHub version lts](https://img.shields.io/badge/release_(LTS)-v{{lts.version}}-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) and [SonarQube 7.4](https://www.sonarqube.org/sonarqube-7-4) 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:
Docker images and docker-compose recipes for out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.6](https://www.sonarqube.org/sonarqube-7-6) 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:


## Usage
Expand Down Expand Up @@ -67,6 +67,7 @@ Please note, that starting from version `2.7.0`, the images no longer contain th


## Changelog
- **3.5.0** - Upgraded sonar-scala to 7.4.0 & SonarQube to 7.6.
- **3.4.0** - Upgraded sonar-scala to 7.3.1.
- **3.3.0** - Upgraded sonar-scala to 7.3.0.
- **3.2.1** - Fixed file system permissions.
Expand Down
13 changes: 8 additions & 5 deletions README_DOCKERHUB.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Docker images with out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.4](https://www.sonarqube.org/sonarqube-7-4) 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).
Docker images with out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.6](https://www.sonarqube.org/sonarqube-7-6) 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).


## Available versions
Expand All @@ -7,9 +7,10 @@ There are two types of images available: images with [sonar-scala](https://githu
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.

#### Current
- `3.4.0` (latest) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.4.0/Dockerfile), `3.4.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.4.0-full/Dockerfile), [Release 3.4.0](https://github.com/mwz/sonar-scala-docker/releases/tag/3.4.0)
- `3.5.0` (latest) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.5.0/Dockerfile), `3.5.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.5.0-full/Dockerfile), [Release 3.5.0](https://github.com/mwz/sonar-scala-docker/releases/tag/3.5.0)
- `2.11.0` (LTS) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.11.0/Dockerfile), `2.11.0-full` (LTS) [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.11.0-full/Dockerfile), [Release 2.11.0](https://github.com/mwz/sonar-scala-docker/releases/tag/2.11.0)
#### Older
- `3.4.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.4.0/Dockerfile), `3.4.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.4.0-full/Dockerfile), [Release 3.4.0](https://github.com/mwz/sonar-scala-docker/releases/tag/3.4.0)
- `3.3.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.3.0/Dockerfile), `3.3.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.3.0-full/Dockerfile), [Release 3.3.0](https://github.com/mwz/sonar-scala-docker/releases/tag/3.3.0)
- `3.2.1` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.1/Dockerfile), `3.2.1-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.1-full/Dockerfile), [Release 3.2.1](https://github.com/mwz/sonar-scala-docker/releases/tag/3.2.1)
- `3.2.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.0/Dockerfile), `3.2.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.0-full/Dockerfile), [Release 3.2.0](https://github.com/mwz/sonar-scala-docker/releases/tag/3.2.0)
Expand All @@ -31,6 +32,8 @@ Starting from version `2.7.0`, the images no longer contain the [sonar-scala-ext
## What's included
Version | SonarQube | sonar-scala | sonar-scala-extra
--------|-----------|-------------|------------------
3.5.0 || 7.4.0
3.5.0-full | 7.6 | 7.4.0
3.4.0 || 7.3.1
3.4.0-full | 7.4 | 7.3.1
3.3.0 || 7.3.0
Expand Down Expand Up @@ -85,7 +88,7 @@ services:
- plugins
plugins:
image: mwizner/sonarqube-scala-plugins:3.4.0
image: mwizner/sonarqube-scala-plugins:3.5.0
volumes:
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
command: /bin/true
Expand All @@ -108,15 +111,15 @@ 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:3.4.0-full
mwizner/sonarqube-scala-plugins:3.5.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, but if you don't have access to an existing database or you just want to try the image, you can use the following command:
```bash
docker run -d \
--name sonarqube-scala-plugins-full \
-p 80:9000 \
mwizner/sonarqube-scala-plugins:3.4.0-full
mwizner/sonarqube-scala-plugins:3.5.0-full
```


Expand Down
2 changes: 1 addition & 1 deletion README_DOCKERHUB.tpl.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Docker images with out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.4](https://www.sonarqube.org/sonarqube-7-4) 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).
Docker images with out-of-the-box [SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and [SonarQube 7.6](https://www.sonarqube.org/sonarqube-7-6) 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).


## Available versions
Expand Down
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=7.4.0-SNAPSHOT
export SONAR_SCALA_VERSION=7.5.0-SNAPSHOT
cp ~/.ivy2/local/com.github.mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/jars/sonar-scala_2.12-assembly.jar .
docker build -t mwizner/sonarqube-scala-plugins:dev --build-arg SONAR_SCALA_VERSION=${SONAR_SCALA_VERSION} .
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:7.4-community
image: sonarqube:7.6-community
ports:
- "80:9000"
networks:
Expand All @@ -21,7 +21,7 @@ services:
depends_on:
- db
db:
image: postgres:10.6-alpine
image: postgres:10.7-alpine
networks:
- sonarnet
environment:
Expand All @@ -31,7 +31,7 @@ services:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
plugins:
image: mwizner/sonarqube-scala-plugins:3.4.0
image: mwizner/sonarqube-scala-plugins:3.5.0
volumes:
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
command: /bin/true
Expand Down
17 changes: 12 additions & 5 deletions vars.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"current": {
"version": "3.4.0",
"sonar": "7.4",
"sonarDocs": "https://docs.sonarqube.org/7.4",
"sonarChangelog": "https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549",
"sonarScala": "7.3.1"
"version": "3.5.0",
"sonar": "7.6",
"sonarDocs": "https://docs.sonarqube.org/7.6",
"sonarChangelog": "https://jira.sonarsource.com/secure/ReleaseNote.jspa?version=14753&projectId=10930",
"sonarScala": "7.4.0"
},
"lts": {
"version": "2.11.0",
Expand All @@ -15,6 +15,13 @@
},
"versions": {
"current": [
{
"version": "3.4.0",
"sonar": "7.4",
"sonarDocs": "https://docs.sonarqube.org/7.4",
"sonarChangelog": "https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549",
"sonarScala": "7.3.1"
},
{
"version": "3.3.0",
"sonar": "7.4",
Expand Down

0 comments on commit 7d9d1a6

Please sign in to comment.