Up to Jenkins Sonar Plugin 1.6, it was possible to use a "Sonar Light" mode with free-style jobs in order to analyse some none Maven projects. This "Sonar Light" mode generated on-the-fly a Maven POM file in order to perform a Sonar analysis. This mode was dropped in Jenkins Sonar Plugin 1.7 and replaced by a new specific Sonar build step that relies on the Sonar Runner (and so do not require any more to use Maven).
After a migration to version 1.8 of the Jenkins Sonar Plugin, the migration scripts provided on this page allows to :
- Know if some free-style job were configured to use the old "Sonar Light" mode with version 1.6.X
- Perform the migration of those jobs by automatically creating a new Sonar build step with the expected configuration where the "Sonar Light" mode was previously used
|About versions 1.7.X|
Those migration scripts can't be used with version 1.7.X of the Jenkins Sonar Plugin. An upgrade to version 1.8+ is first required
1. Check if some of your jobs can be migrated
To get list of all jobs which can be migrated, run the following Groovy script in Jenkins script console :
If you don't get any results, then you can stop here.
2. Perform the migration
Run the following script to perform a dry-run migration (= has no effect, only prints out what will be done in case of a real migration):
If the properties that are printed out look correct to you, then change the "false" boolean into "true" at the end of the script to perform the actual migration. Run the script again: your jobs will be migrated.