game-ci / game-ci/docker

SonarQube support

Open
#123 17 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Dockerfile
Stars
470
Forks
140
PR merge metrics
No merged PRs in 30d

Description

**Context**

Although I've successfully managed to get sonarqube analysing in my gitlab pipeline, the runs could be made significantly faster by adding some commands to the docker image.

**Suggested solution**

If the following two steps current implemented in my pipeline were baked into the image instead, each build would take about 3 minutes less.

- apt-get install -y openjdk-11-jre
- dotnet tool install --global dotnet-sonarscanner

Even just priming dotnet (as it takes an extra minute to run the first time you use it even if you don't do anything meaningful) would be a big help.

**Considered alternatives**

* I could make an image that uses gameci as a base, but I wanted to put this out there because I think quite a few people may benefit from these changes.
* Instead of bloating the existing images, we could add another "target platform" for sonar builds. This would probably be the best solution, as we wouldn't bloat existing images but still would give the desired build time benefits to those who desire them.

**Additional details**

It could be worth a conversation about adding an official guide to using sonarqube to the main documentation. That would encourage people to use it (and thus write better code) and make it easier for people like me who had to fight the dragons in near solitude.

I'm happy to do the PR for this one - but I wanted some feedback first before putting in the effort.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.