I am new to Sonarqube. when I am building Jenkins pipeline, I am having “INFO: Project root configuration file: NONE” error. I tried whole day to fix it. but still couldn’t.
It can build successful with SonarEnvironmentName ‘DEV2’ . there is no error for ‘DEV2’. but I am having error with SonarEnvironmentName “DEV”. here is analysis log for SonarEnvironmentName “DEV”
Injecting SonarQube environment variables using the configuration: sonarqube-99
[Pipeline] {
[Pipeline] sh
+ /apps/gsportal/sonar-scanner-gsp-7.1/bin/sonar-scanner -D sonar.sources=src/main -D sonar.test=src/test -D sonar.projectKey=COP-CatalogueService-DEV -D sonar.projectName=COP-CatalogueService-DEV -D sonar.projectVersion=1 -D sonar.login=admin -D sonar.password=xadmin -D sonar.scm.disabled=True -D sonar.jacoco.reportPath=build/jacoco/jacoco.exec -D sonar.java.binaries=build/classes/java/main -D 'sonar.junit.reportsPath=build/test-results/test/*.xml'
INFO: Scanner configuration file: /apps/gsportal/sonar-scanner-gsp-7.1/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 4.0.0.1744
INFO: Java 1.8.0_162 Oracle Corporation (64-bit)
INFO: Linux 4.1.12-124.18.6.el7uek.x86_64 amd64
INFO: User cache: /home/bea/.sonar/cache
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.328s
INFO: Final Memory: 6M/479M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:181)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:122)
at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: <!DOCTYPE html><html lang="en"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"><link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"><link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"><link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png"><link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png"><link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png"><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png"><link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png"><link rel="icon" type="image/x-icon" href="/favicon.ico"><meta name="application-name" content="SonarQube"/><meta name="msapplication-TileColor" content="#FFFFFF"/><meta name="msapplication-TileImage" content="/mstile-512x512.png"/><link href="/css/main.e04508c4.css" rel="stylesheet"><title>Loading...</title></head><body><div id="content"><div class="global-loading"><i class="spinner global-loading-spinner"></i> <span class="global-loading-text">Loading...</span></div></div><script>window.baseUrl=""</script><script src="/js/vendors~main.57ecd91f.chunk.js"></script><script src="/js/main.e04508c4.js"></script></body></html>
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(BootstrapIndexDownloader.java:59)
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:44)
at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
... 7 more
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
[Pipeline] }
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Sonar Quality Gate Email Approval)
Stage "Sonar Quality Gate Email Approval" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Library Policy Evaluation)
Stage "Library Policy Evaluation" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Nexus Artifact Uploader)
Stage "Nexus Artifact Uploader" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Deploy)
Stage "Deploy" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Email Notification)
Stage "Email Notification" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
Is an indication that you’ve mis-configured your SonarQube server URL for analysis. I’m guessing this is a question of server context (i.e. the path in the URL).
I checked the server URL. then I found an issue in there. I put correct URL there. (Jenkins - Configure System - SonarQube servers) . Now build is successfully completing. Thanks Ann. You saved my day!