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

Commit bd1a455

Browse files
authored
Upgrde SonarQube to 7.8 and sonar-scala to 7.6. (#14)
1 parent 936119d commit bd1a455

File tree

12 files changed

+473
-209
lines changed

12 files changed

+473
-209
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
name: Build
1111
command: |
1212
sudo apt-get install -y jq
13-
export VERSION=`jq -r '.current.version' vars.js`
14-
export VERSION_LTS=`jq -r '.lts.version' vars.js`
13+
export VERSION=`jq -r '.current.version' vars.json`
14+
export VERSION_LTS=`jq -r '.lts.version' vars.json`
1515
docker build -t mwizner/sonarqube-scala-plugins:$VERSION $VERSION
1616
docker build -t mwizner/sonarqube-scala-plugins:$VERSION-full $VERSION-full
1717
docker build -t mwizner/sonarqube-scala-plugins:$VERSION_LTS $VERSION_LTS
@@ -35,7 +35,7 @@ jobs:
3535
name: Release
3636
command: |
3737
sudo apt-get install -y jq
38-
export VERSION=`jq -r '.current.version' vars.js`
38+
export VERSION=`jq -r '.current.version' vars.json`
3939
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
4040
./release.sh
4141
git tag -a $VERSION -m "Release $VERSION."
@@ -59,7 +59,7 @@ jobs:
5959
name: Release LTS
6060
command: |
6161
sudo apt-get install -y jq
62-
export VERSION=`jq -r '.lts.version' vars.js`
62+
export VERSION=`jq -r '.lts.version' vars.json`
6363
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
6464
./release-lts.sh
6565
git tag -a $VERSION -m "Release $VERSION."

3.7.0-full/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SonarQube 7.8 image with bundled sonar-scala 7.6.0 (https://github.com/mwz/sonar-scala).
2+
3+
FROM sonarqube:7.8-community
4+
5+
ENV SONAR_SCALA_VERSION 7.6.0
6+
7+
WORKDIR /opt/sonarqube/extensions/plugins
8+
RUN rm sonar-scala-plugin-* && 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"]

3.7.0/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Minideb image with bundled sonar-scala 7.6.0 (https://github.com/mwz/sonar-scala),
2+
# which can be mounted as a volume into a SonarQube container.
3+
4+
FROM bitnami/minideb:stretch
5+
RUN install_packages curl ca-certificates
6+
7+
ENV SONAR_SCALA_VERSION 7.6.0
8+
9+
RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube
10+
WORKDIR /opt/sonarqube/extensions/plugins
11+
RUN curl -L -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"
13+
RUN chown -R sonarqube:sonarqube /opt/sonarqube

README.md

Lines changed: 106 additions & 65 deletions
Large diffs are not rendered by default.

README.tpl.md

Lines changed: 84 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,45 @@
11
# sonar-scala-docker
2+
23
[![GitHub version](https://img.shields.io/badge/release-v{{current.version}}-blue.svg)](https://github.com/mwz/sonarqube-scala-docker/releases)
3-
[![GitHub version lts](https://img.shields.io/badge/release_(LTS)-v{{lts.version}}-blue.svg)](https://github.com/mwz/sonarqube-scala-docker/releases)
4+
[![GitHub version lts](<https://img.shields.io/badge/release_(LTS)-v{{lts.version}}-blue.svg>)](https://github.com/mwz/sonarqube-scala-docker/releases)
45
[![Docker Pulls](https://img.shields.io/docker/pulls/mwizner/sonarqube-scala-plugins.svg)](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
56

6-
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:
7-
7+
Docker images and docker-compose recipes for out-of-the-box
8+
[SonarQube 6.7 LTS](https://www.sonarqube.org/sonarqube-6-7-lts) and
9+
[SonarQube 7.8](https://www.sonarqube.org/sonarqube-7-8) instance with support
10+
for [Scala](http://www.scala-lang.org),
11+
[Scoverage](https://github.com/scoverage/scalac-scoverage-plugin) (code coverage
12+
metrics) and [Scalastyle](http://www.scalastyle.org) +
13+
[Scapegoat](https://github.com/sksamuel/scapegoat) (static code analysis).
14+
:sunglasses:
815

916
## Usage
17+
1018
To start SonarQube in a daemon mode, simply run:
1119

1220
```bash
1321
docker-compose up -d
1422
```
23+
1524
or the following for the LTS version:
25+
1626
```bash
1727
docker-compose -f docker-compose-lts.yml up -d
1828
```
1929

20-
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`.
30+
Once docker pulls all the required images and starts up the containers, the
31+
application should become available on [http://localhost](http://localhost). The
32+
default SonarQube login details for the Administrator account are `admin:admin`.
2133

22-
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.
34+
You can also use a standalone docker image which contains SonarQube server with
35+
bundled sonar-scala plugin,
36+
[`mwizner/sonarqube-scala-plugins:{{current.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
37+
and
38+
[`mwizner/sonarqube-scala-plugins:{{lts.version}}-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins)
39+
for the LTS version.
2340

2441
To start the container issue the following command:
42+
2543
```bash
2644
docker run -d \
2745
--name sonarqube-scala-plugins-full \
@@ -31,66 +49,88 @@ docker run -d \
3149
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
3250
mwizner/sonarqube-scala-plugins:{{current.version}}-full
3351
```
34-
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:
52+
53+
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable,
54+
SonarQube will use an embedded H2 database, which is not recommended in
55+
production, but if you don't have access to an existing database or you just
56+
want to try the image, you can use the following command:
57+
3558
```bash
3659
docker run -d \
3760
--name sonarqube-scala-plugins-full \
3861
-p 80:9000 \
3962
mwizner/sonarqube-scala-plugins:{{current.version}}-full
4063
```
4164

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

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

5076
## Compatibility Matrix
51-
Version | SonarQube | sonar-scala | sonar-scala-extra
52-
--------|-----------|-------------|------------------
53-
[{{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}})
77+
78+
<!-- prettier-ignore-start -->
79+
|Version | SonarQube | sonar-scala | sonar-scala-extra|
80+
|--------|-----------|-------------|------------------|
81+
[{{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}})
5482
{{#versions.current}}
55-
[{{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}})
83+
[{{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}})
5684
{{/versions.current}}
57-
[{{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}})
85+
[{{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}})
5886
{{#versions.lts}}
59-
[{{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}}
87+
[{{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}}
6088
{{/versions.lts}}
89+
<!-- prettier-ignore-end -->
6190

62-
63-
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.
91+
Please note, that starting from version `2.7.0`, the images no longer contain
92+
the [sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) plugin as
93+
sonar-scala provides Scapegoat support from version `6.5.0` onwards.
6494

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

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

69100
## Changelog
70-
- **3.6.0** - Upgraded sonar-scala to 7.5.0 & SonarQube to 7.7.
71-
- **3.5.0** - Upgraded sonar-scala to 7.4.0 & SonarQube to 7.6.
72-
- **3.4.0** - Upgraded sonar-scala to 7.3.1.
73-
- **3.3.0** - Upgraded sonar-scala to 7.3.0.
74-
- **3.2.1** - Fixed file system permissions.
75-
- **3.2.0** - Upgraded sonar-scala to 7.2.0.
76-
- **3.1.0** - Upgraded sonar-scala to 7.1.0 & SonarQube to 7.4.
77-
- **3.0.0** - Upgraded sonar-scala to 7.0.0 & SonarQube to 7.3.
78-
- **2.12.0** - Upgraded SonarQube to 6.7.7 LTS.
79-
- **2.11.0** - Upgraded sonar-scala to 6.8.0.
80-
- **2.10.0** - Upgraded sonar-scala to 6.7.0 & SonarQube to 6.7.6.
81-
- **2.9.0** - Upgraded sonar-scala to 6.6.0.
82-
- **2.8.0** - Upgraded sonar-scala to 6.5.1 & SonarQube to 6.7.5.
83-
- **2.7.0** - Upgraded sonar-scala to 6.5.0, which brings support for scapegoat.
84-
- **2.6.0** - Upgraded SonarQube to 6.7.4.
85-
- **2.5.0** - Upgraded sonar-scala to 6.4.0.
86-
- **2.4.0** - Upgraded sonar-scala to 6.3.0.
87-
- **2.3.0** - Upgraded sonar-scala to 6.2.0.
88-
- **2.2.1** - Upgraded SonarQube to 6.7.3 LTS.
89-
- **2.2.0** - Upgraded sonar-scala to 6.1.0 & SonarQube to 6.7.2 LTS.
90-
- **2.1.0** - Published docker image with Scala plugins to dockerhub [mwizner/sonarqube-scala-plugins](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
91-
- **2.0.0** - SonarQube 6.7.1 LTS.
92-
- **1.0.0** - SonarQube 5.6.7 LTS.
93101

102+
<details>
103+
<summary>Expand to see the changelog.</summary>
104+
<ul>
105+
<li><strong>3.7.0</strong> - Upgraded sonar-scala to 7.6.0 & SonarQube to 7.8.</li>
106+
<li><strong>3.6.0</strong> - Upgraded sonar-scala to 7.5.0 & SonarQube to 7.7.</li>
107+
<li><strong>3.5.0</strong> - Upgraded sonar-scala to 7.4.0 & SonarQube to 7.6.</li>
108+
<li><strong>3.4.0</strong> - Upgraded sonar-scala to 7.3.1.</li>
109+
<li><strong>3.3.0</strong> - Upgraded sonar-scala to 7.3.0.</li>
110+
<li><strong>3.2.1</strong> - Fixed file system permissions.</li>
111+
<li><strong>3.2.0</strong> - Upgraded sonar-scala to 7.2.0.</li>
112+
<li><strong>3.1.0</strong> - Upgraded sonar-scala to 7.1.0 & SonarQube to 7.4.</li>
113+
<li><strong>3.0.0</strong> - Upgraded sonar-scala to 7.0.0 & SonarQube to 7.3.</li>
114+
<li><strong>2.12.0</strong> - Upgraded SonarQube to 6.7.7 LTS.</li>
115+
<li><strong>2.11.0</strong> - Upgraded sonar-scala to 6.8.0.</li>
116+
<li><strong>2.10.0</strong> - Upgraded sonar-scala to 6.7.0 & SonarQube to 6.7.6.</li>
117+
<li><strong>2.9.0</strong> - Upgraded sonar-scala to 6.6.0.</li>
118+
<li><strong>2.8.0</strong> - Upgraded sonar-scala to 6.5.1 & SonarQube to 6.7.5.</li>
119+
<li><strong>2.7.0</strong> - Upgraded sonar-scala to 6.5.0, which brings support for scapegoat.</li>
120+
<li><strong>2.6.0</strong> - Upgraded SonarQube to 6.7.4.</li>
121+
<li><strong>2.5.0</strong> - Upgraded sonar-scala to 6.4.0.</li>
122+
<li><strong>2.4.0</strong> - Upgraded sonar-scala to 6.3.0.</li>
123+
<li><strong>2.3.0</strong> - Upgraded sonar-scala to 6.2.0.</li>
124+
<li><strong>2.2.1</strong> - Upgraded SonarQube to 6.7.3 LTS.</li>
125+
<li><strong>2.2.0</strong> - Upgraded sonar-scala to 6.1.0 & SonarQube to 6.7.2 LTS.</li>
126+
<li><strong>2.1.0</strong> - Published docker image with Scala plugins to dockerhub
127+
[mwizner/sonarqube-scala-plugins](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).</li>
128+
<li><strong>2.0.0</strong> - SonarQube 6.7.1 LTS.</li>
129+
<li><strong>1.0.0</strong> - SonarQube 5.6.7 LTS.</li>
130+
</ul>
131+
</details>
94132

95133
## License
96-
The project is licensed under the Apache License v2. See the [LICENSE file](LICENSE) for more details.
134+
135+
The project is licensed under the Apache License v2. See the
136+
[LICENSE file](LICENSE) for more details.

0 commit comments

Comments
 (0)