SonarQube is used as an integration with Jenkins to enable code quality analysis.
Installation is pretty straightforward as discussed in the official documentation. In this blog, I would like to share some “hipccups” that I encountered during server upgrade scenario.
- Setup PostgreSQL server
This blog has pretty comprehensive notes on this
2. Backup the existing database using pg_dump (as Postgres user)
5. Start Sonar server on the empty database (this will not be the actual database that we will use)
4. Copy over the SQL dump from old database to new database
psql -h newSonar.host.com -d sonar -U postgres -f “sonar_bck.sql”
3. Point Sonar to the newly created database that was populated with data by modifying the config
6. Delete /opt/sonar/data/main/es to clear Elastic Search indexes if “issues” are not showing up on Sonar
7. Restart Sonar
Leave a Reply