- Update
Dockerfile
s with the new version of SonarQube - Update external plugins in the config.json
- Create profiles based on the internal plugin versions in the config.json
- Obtain the base version numbers from the vanilla SonarQube image directory
/opt/sonarqube/lib/extensions
, excluding build number - Update the config rules version number
rules_version
if the rules have been changed
- Obtain the base version numbers from the vanilla SonarQube image directory
- Create new version tags on github
MAJOR.MINOR.PATCH
MAJOR.MINOR.PATCH-developer
- Build and push new images to docker hub with CircleCI
Add the url of the plugin jar-file to be installed to the config.json value of plugins
.
Modify the config.json value of profiles
and add a key (language as profile name) with value dictionary, such as:
"yaml": {
"plugin_name": "sonar-ansible-plugin",
"plugin_external": true,
"version": "ansible-profile-v2.5.1"
},
The parameters are:
- (key): language (internal SonarQube language identifier)
- plugin_name: name of the plugin to be used for this profile
- plugin_external: true for external plugin, false (default) when it is contained in the base container image
- version: profile version string (based on the plugin version)
In order to make the importing of existing profiles easier, use the transformation profile_backup_transform.xslt
.
Go to the profiles page in your SonarQube instance, backup a profile to an xml file and transform it.
Modify the corresponding config.json value of rules[language]
.
Each entry represents a rule to be activated or deactivated and has the following syntax: (operation)(ruleId)#(comment)
- operation:
+
activates a rule;-
deactivates a rule - ruleId: SonarQube rule identifier
Example:
+csharpsquid:S104 # NCSS; used by Quality-time
To (de)activate groups of rules by type use this syntax:
(operation)types=(comma,delimited,list,of,types)#(comment)
The following types are available:
CODE_SMELL
BUG
VULNERABILITY
SECURITY_HOTSPOT
Example:
+types=SECURITY_HOTSPOT,VULNERABILITY # Enable these types by default