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

Upgrde SonarQube to 7.8 and sonar-scala to 7.6. #14

Merged
merged 2 commits into from
Aug 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
name: Build
command: |
sudo apt-get install -y jq
export VERSION=`jq -r '.current.version' vars.js`
export VERSION_LTS=`jq -r '.lts.version' vars.js`
export VERSION=`jq -r '.current.version' vars.json`
export VERSION_LTS=`jq -r '.lts.version' vars.json`
docker build -t mwizner/sonarqube-scala-plugins:$VERSION $VERSION
docker build -t mwizner/sonarqube-scala-plugins:$VERSION-full $VERSION-full
docker build -t mwizner/sonarqube-scala-plugins:$VERSION_LTS $VERSION_LTS
Expand All @@ -35,7 +35,7 @@ jobs:
name: Release
command: |
sudo apt-get install -y jq
export VERSION=`jq -r '.current.version' vars.js`
export VERSION=`jq -r '.current.version' vars.json`
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
./release.sh
git tag -a $VERSION -m "Release $VERSION."
Expand All @@ -59,7 +59,7 @@ jobs:
name: Release LTS
command: |
sudo apt-get install -y jq
export VERSION=`jq -r '.lts.version' vars.js`
export VERSION=`jq -r '.lts.version' vars.json`
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
./release-lts.sh
git tag -a $VERSION -m "Release $VERSION."
Expand Down
12 changes: 12 additions & 0 deletions 3.7.0-full/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SonarQube 7.8 image with bundled sonar-scala 7.6.0 (https://github.com/mwz/sonar-scala).

FROM sonarqube:7.8-community

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want to keep a separate folder for every old version you had, despite it's outdated?
Would it be better just to change one Dockerfile upgrading some versions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was planning to clean up this repo, so I'll do that at some point.


ENV SONAR_SCALA_VERSION 7.6.0

WORKDIR /opt/sonarqube/extensions/plugins
RUN rm sonar-scala-plugin-* && 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.7.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Minideb image with bundled sonar-scala 7.6.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.6.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
171 changes: 106 additions & 65 deletions README.md

Large diffs are not rendered by default.

128 changes: 84 additions & 44 deletions README.tpl.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
# sonar-scala-docker

[![GitHub version](https://img.shields.io/badge/release-v{{current.version}}-blue.svg)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![GitHub version lts](https://img.shields.io/badge/release_(LTS)-v{{lts.version}}-blue.svg)](https://github.com/mwz/sonarqube-scala-docker/releases)
[![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.7](https://www.sonarqube.org/sonarqube-7-7) 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.8](https://www.sonarqube.org/sonarqube-7-8) 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

To start SonarQube in a daemon mode, simply run:

```bash
docker-compose up -d
```

or the following for the LTS version:

```bash
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`.
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:{{current.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins) and [`mwizner/sonarqube-scala-plugins:{{lts.version}}-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:{{current.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
and
[`mwizner/sonarqube-scala-plugins:{{lts.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
for the LTS version.

To start the container issue the following command:

```bash
docker run -d \
--name sonarqube-scala-plugins-full \
Expand All @@ -31,66 +49,88 @@ docker run -d \
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
mwizner/sonarqube-scala-plugins:{{current.version}}-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:

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:{{current.version}}-full
```


## Dependencies
* [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) / [SonarQube 7.7](https://hub.docker.com/_/sonarqube)
* [PostgreSQL 10](https://hub.docker.com/_/postgres)
* [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle, scoverage and scapegoat
* versions before `2.7.0` used [arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) for scapegoat support

- [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) /
[SonarQube 7.8](https://hub.docker.com/_/sonarqube)
- [PostgreSQL 10](https://hub.docker.com/_/postgres)
- [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for
scalastyle, scoverage and scapegoat
- versions before `2.7.0` used
[arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra)
for scapegoat support

## Compatibility Matrix
Version | SonarQube | sonar-scala | sonar-scala-extra
--------|-----------|-------------|------------------
[{{current.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{current.version}}) | {{current.sonar}} ([documentation]({{{current.sonarDocs}}}))([changelog]({{{current.sonarChangelog}}})) | [{{current.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{current.sonarScala}})

<!-- prettier-ignore-start -->
|Version | SonarQube | sonar-scala | sonar-scala-extra|
|--------|-----------|-------------|------------------|
[{{current.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{current.version}}) | {{current.sonar}} [documentation]({{{current.sonarDocs}}}), [changelog]({{{current.sonarChangelog}}}) | [{{current.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{current.sonarScala}})
{{#versions.current}}
[{{version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{version}}) | {{sonar}} ([documentation]({{{sonarDocs}}}))([changelog]({{{sonarChangelog}}})) | [{{sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{sonarScala}})
[{{version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{version}}) | {{sonar}} [documentation]({{{sonarDocs}}}), [changelog]({{{sonarChangelog}}}) | [{{sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{sonarScala}})
{{/versions.current}}
[{{lts.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{lts.version}}) | {{lts.sonar}} ([documentation]({{{lts.sonarDocs}}}))([changelog]({{{lts.sonarChangelog}}})) | [{{lts.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{lts.sonarScala}})
[{{lts.version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{lts.version}}) | {{lts.sonar}} [documentation]({{{lts.sonarDocs}}}), [changelog]({{{lts.sonarChangelog}}}) | [{{lts.sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{lts.sonarScala}})
{{#versions.lts}}
[{{version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{version}}) | {{sonar}} ([documentation]({{{sonarDocs}}}))([changelog]({{{sonarChangelog}}})) | [{{sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{{sonarScala}}}) | {{#sonarScalaExtra}}[{{sonarScalaExtra}}](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v{{sonarScalaExtra}}){{/sonarScalaExtra}}
[{{version}}](https://github.com/mwz/sonarqube-scala-docker/releases/tag/{{version}}) | {{sonar}} [documentation]({{{sonarDocs}}}), [changelog]({{{sonarChangelog}}}) | [{{sonarScala}}](https://github.com/mwz/sonar-scala/releases/tag/v{{{sonarScala}}}) | {{#sonarScalaExtra}}[{{sonarScalaExtra}}](https://github.com/arthepsy/sonar-scala-extra/releases/tag/v{{sonarScalaExtra}}){{/sonarScalaExtra}}
{{/versions.lts}}
<!-- prettier-ignore-end -->


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

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

[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
- **3.6.0** - Upgraded sonar-scala to 7.5.0 & SonarQube to 7.7.
- **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.
- **3.2.0** - Upgraded sonar-scala to 7.2.0.
- **3.1.0** - Upgraded sonar-scala to 7.1.0 & SonarQube to 7.4.
- **3.0.0** - Upgraded sonar-scala to 7.0.0 & SonarQube to 7.3.
- **2.12.0** - Upgraded SonarQube to 6.7.7 LTS.
- **2.11.0** - Upgraded sonar-scala to 6.8.0.
- **2.10.0** - Upgraded sonar-scala to 6.7.0 & SonarQube to 6.7.6.
- **2.9.0** - Upgraded sonar-scala to 6.6.0.
- **2.8.0** - Upgraded sonar-scala to 6.5.1 & SonarQube to 6.7.5.
- **2.7.0** - Upgraded sonar-scala to 6.5.0, which brings support for scapegoat.
- **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.
- **2.2.1** - Upgraded SonarQube to 6.7.3 LTS.
- **2.2.0** - Upgraded sonar-scala to 6.1.0 & SonarQube to 6.7.2 LTS.
- **2.1.0** - Published docker image with Scala plugins to dockerhub [mwizner/sonarqube-scala-plugins](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
- **2.0.0** - SonarQube 6.7.1 LTS.
- **1.0.0** - SonarQube 5.6.7 LTS.

<details>
<summary>Expand to see the changelog.</summary>
<ul>
<li><strong>3.7.0</strong> - Upgraded sonar-scala to 7.6.0 & SonarQube to 7.8.</li>
<li><strong>3.6.0</strong> - Upgraded sonar-scala to 7.5.0 & SonarQube to 7.7.</li>
<li><strong>3.5.0</strong> - Upgraded sonar-scala to 7.4.0 & SonarQube to 7.6.</li>
<li><strong>3.4.0</strong> - Upgraded sonar-scala to 7.3.1.</li>
<li><strong>3.3.0</strong> - Upgraded sonar-scala to 7.3.0.</li>
<li><strong>3.2.1</strong> - Fixed file system permissions.</li>
<li><strong>3.2.0</strong> - Upgraded sonar-scala to 7.2.0.</li>
<li><strong>3.1.0</strong> - Upgraded sonar-scala to 7.1.0 & SonarQube to 7.4.</li>
<li><strong>3.0.0</strong> - Upgraded sonar-scala to 7.0.0 & SonarQube to 7.3.</li>
<li><strong>2.12.0</strong> - Upgraded SonarQube to 6.7.7 LTS.</li>
<li><strong>2.11.0</strong> - Upgraded sonar-scala to 6.8.0.</li>
<li><strong>2.10.0</strong> - Upgraded sonar-scala to 6.7.0 & SonarQube to 6.7.6.</li>
<li><strong>2.9.0</strong> - Upgraded sonar-scala to 6.6.0.</li>
<li><strong>2.8.0</strong> - Upgraded sonar-scala to 6.5.1 & SonarQube to 6.7.5.</li>
<li><strong>2.7.0</strong> - Upgraded sonar-scala to 6.5.0, which brings support for scapegoat.</li>
<li><strong>2.6.0</strong> - Upgraded SonarQube to 6.7.4.</li>
<li><strong>2.5.0</strong> - Upgraded sonar-scala to 6.4.0.</li>
<li><strong>2.4.0</strong> - Upgraded sonar-scala to 6.3.0.</li>
<li><strong>2.3.0</strong> - Upgraded sonar-scala to 6.2.0.</li>
<li><strong>2.2.1</strong> - Upgraded SonarQube to 6.7.3 LTS.</li>
<li><strong>2.2.0</strong> - Upgraded sonar-scala to 6.1.0 & SonarQube to 6.7.2 LTS.</li>
<li><strong>2.1.0</strong> - Published docker image with Scala plugins to dockerhub
[mwizner/sonarqube-scala-plugins](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).</li>
<li><strong>2.0.0</strong> - SonarQube 6.7.1 LTS.</li>
<li><strong>1.0.0</strong> - SonarQube 5.6.7 LTS.</li>
</ul>
</details>

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

The project is licensed under the Apache License v2. See the
[LICENSE file](LICENSE) for more details.
Loading