Open squalou opened 5 years ago
Same here for a months.
Sonar scanner log:
+ sonar-scanner
INFO: Scanner configuration file: NONE
INFO: Project root configuration file: /home/jenkins/workspace/panel-web-interface/sonar-project.properties
INFO: SonarQube Scanner 4.2.0.1873
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 4.15.0-88-generic amd64
INFO: User cache: /root/.sonar/cache
INFO: SonarQube server 8.3.1
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=164ms
INFO: Server id: 84ABEE94-AXAcGpPJK_MK0QpAXZ0a
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=31ms
INFO: Load/download plugins (done) | time=9672ms
INFO: Process project properties
INFO: Process project properties (done) | time=0ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: panel-web-interface
INFO: Base dir: /home/jenkins/workspace/panel-web-interface
INFO: Working dir: /home/jenkins/workspace/panel-web-interface/.scannerwork
INFO: Load project settings for component key: 'panel-web-interface'
INFO: Load project settings for component key: 'panel-web-interface' (done) | time=39ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=81ms
INFO: Auto-configuring with CI 'Jenkins'
INFO: Load active rules
INFO: Load active rules (done) | time=1091ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Load project repositories
INFO: Load project repositories (done) | time=48ms
INFO: 271 files indexed
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for web: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module panel-web-interface
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=30ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/root/.sonar/cache/54f6535c111cefad0fb6a09ba3e61922/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor SonarCSS Metrics [cssfamily]
INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=45ms
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: 80 source files to be analyzed
INFO: 80/80 source files have been analyzed
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=1095ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor JavaScript analysis [javascript]
INFO: 141 source files to be analyzed
INFO: 141/141 source files have been analyzed
INFO: Sensor SonarJS [javascript]
INFO: 141 source files to be analyzed
INFO: Sensor SonarJS [javascript] (done) | time=1592ms
INFO: Sensor JavaScript analysis [javascript] (done) | time=5393ms
INFO: 141/141 source files have been analyzed
INFO: Sensor JavaXmlSensor [java]
INFO: 1 source files to be analyzed
INFO: Sensor JavaXmlSensor [java] (done) | time=88ms
INFO: Sensor HTML [web]
INFO: 1/1 source files have been analyzed
INFO: Sensor HTML [web] (done) | time=93ms
INFO: Sensor XML Sensor [xml]
INFO: 1 source files to be analyzed
INFO: Sensor XML Sensor [xml] (done) | time=61ms
INFO: 1/1 source files have been analyzed
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=18ms
INFO: CPD Executor 42 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 101 files
INFO: CPD Executor CPD calculation finished (done) | time=45ms
INFO: Analysis report generated in 50ms, dir size=880 KB
INFO: Analysis report compressed in 193ms, zip size=427 KB
INFO: Analysis report uploaded in 124ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://sonarqube:9000/dashboard?id=panel-web-interface
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://sonarqube:9000/api/ce/task?id=AXI5dWA9ejPFXOIPDMLN
INFO: Analysis total time: 10.168 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 22.807s
INFO: Final Memory: 14M/57M
INFO: ----------------------------
Hi,
I've tried to set this up :
All these on premises
When the jenkins job launches this :
mvn sonar:sonar -Dsonar.branch=$branchName -Dsonar.analysis.mode=preview -Dsonar.gitlab.project_id=$project_id -Dsonar.gitlab.commit_sha=$commit_sha -Dsonar.gitlab_ref=$branchName
Gitlab logs this (among piles of other things :) )
The CI/CD 'pipeline' displays a 'sonarqube' step in 'running' state. This tends to proove that the connexion works. I've checked that 'sonar' user has the developer role on the project.
...
but that's all
Maven command ends successfully BUT no sonar anlysis reports are available Gitlab and the 'pipeline' stays 'running'
Now,if I remove 'preview mode'
Maven command is successful, Sonar reports is published on Sonar Nothing is published on Gitlab and the 'pipeline' stays 'running'
Is there anywhere I should look for addition logs ?
What is supposed to tell Gitlab that sonarqube has ended ?
Any idea why the preview mode ends with this 'unable to locate report', is it expected ?
Any help sorting this out will be much appreciated.