wttech / AEM-Rules-for-SonarQube

SonarQube plugin with set of rules detecting possible bugs and bad smells specific for AEM development.
Apache License 2.0
112 stars 51 forks source link

Automate the testing of SonarQube statup with Docker #207

Closed toniedzwiedz closed 2 years ago

toniedzwiedz commented 3 years ago

We've previously seen examples of the plugin causing SonarQube to fail to start due to runtime dependency conflicts. It has been fixed but it's worrying that this is something our unit tests failed to detect.

Travis should allow us to spin up a Docker container with a base version of SonarQube and install the current version of the plugin to make sure it starts up correctly. The process is not complicated but a little time-consuming if done manually.

An example Dockerfile used in a simple 8.4.1 startup test

FROM sonarqube:8.4.1-community

COPY sonar-aemrules-plugin-1.2.jar $SONARQUBE_HOME/extensions/plugins/sonar-aemrules-plugin-1.2.jar
COPY sonar-findbugs-plugin-3.11.0.jar $SONARQUBE_HOME/extensions/plugins/sonar-findbugs-plugin-3.11.0.jar

followed by building and running an image should do the trick.

toniedzwiedz commented 2 years ago

https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions

toniedzwiedz commented 2 years ago

Fixed.