Tuesday, May 22, 2018

Sonarqube Tutorials


Installing plugin in SonarQube
------------------------------

1. Download plugin. Example is a typescript plugin.
sonar-typescript-plugin-1.6.0.2388.jar

2. Copy plugin to /opt/sonar/extensions/plugin

3. Restart sonar
service sonar restart

4. Take note that some plugins needs higher version of sonarqube. If needed,
upgrade sonar instance first

Upgrading Sonar Instance
------------------------

1. Download sonarqube from https://www.sonarqube.org/downloads/

2. Stop sonarqube
service sonar stop

3. Rename old installation directory
mv /opt/sonar /opt/sonar_old

4. Extract new sonar version to /opt (fix the underlying paths if needed)
unzip .zip /opt

5. Edit the following files and get the values from the old config
vi /opt/sonar/conf/sonar.properties
vi /opt/sonar/conf/wrapper.conf

6. Apply correct permissions
chown -R sonar:sonar /opt/sonar

7. Start sonar
service sonar start

8. Do a database migration if needed by going to http://sonar.host:8080

No comments:

Post a Comment