Wednesday 29 November 2017

SonarQube et Jenkins

SonarQube was fun while it lasted, while I used the embedded version. When it was time to get my production SonarQube on a separate server, it became a huge problem.

Firstly, Sonar had too many issues working on my AWS hosted Windows 2016 server. My DB, a SQL server, got it connected to SonarQube but Sonar expected it to be upgraded. It finally got upgraded and Sonar had issues with it because the Latin_General_CP1_CS_AS got changed after the update and it was no where to be found.

Resolving the DB:
I got another SQL server on AWS RDS and connected to that, I stopped the upgrade of that DB for the duration of setup.

SonarQube Version:
Sonar 6.3 Works!!! 6.5 - 6.7 had issues with SQL server.

Jenkins:
After all the drama with SonarQube, then came Jenkins. I thought it would be easier but it obviously wasn't. I got the necessary plugins installed, including Sonar Scanner. Now, the configuration is the issue.
With Jenkins, ensure you use JDK for ANT otherwise, Jenkins won't see it. Also, you need to reference Sonar Properties in the sonar scanner section of the Build configuration.
Important!! don't forget to get your Sonar Token from sonar Administration portal, you may choose version 5.2 in Jenkins configuration to enter username and password, but if you use anything higher, you require a token!

No comments:

Post a Comment