The task is to run our backend PHP tests using SonarQube from a Jenkins Pipeline job.

Jenkins is running in Docker, and all its builds also use Docker.

The main issue I faced during this setup was that container with SonarQube is running two services: one is the SonarQube itself and the second one is with Elasticesearch (while containers concept says “One service per one container”).

During that Elasticsearch cannot be started from the root user, so I had to play a bit with UIDs and mount points.

Contents