[FOLIO-3356] Sonarqube scan fails to run in CI for repo folio-vertx-lib Created: 02/Dec/21 Updated: 02/Dec/21 Resolved: 02/Dec/21 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | P2 |
| Reporter: | John Malconian | Assignee: | John Malconian |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Sprint: | DevOps Sprint 128 |
| Development Team: | FOLIO DevOps |
| Description |
|
Sonarqube runs fine on master but fails on PR/branch build with the error: [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project folio-vertx-lib: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration: Could not find a default branch to fall back on. |
| Comments |
| Comment by John Malconian [ 02/Dec/21 ] |
|
Sonarqube creates and tracks SQ projects using a project key. The project key for Maven projects is derived from the 'groupId' and 'artifactId' defined in the project's top-level pom.xml. In order to compare new code and code changes against a baseline, SQ must have an initial scan of repository's default branch. This PR, https://github.com/folio-org/folio-vertx-lib/pull/16, includes a change to the artifactId attribute, which changes the associated SQ project key, which, effectively, creates a whole new SQ project. This new SQ project does not have that initial scan of the default branch and, therefore, fails. This has been resolved by disabling SQ temporarily and merging the change above to the default branch, re-enabling SQ in the Jenkinsfile directly on master and running a scan of the default branch so that SQ has that initial scan of the default branch (master) for it's "new" project. Subsequent PRs will now perform a SQ scan properly. |