Open johlandabee opened 5 years ago
Having the same error on Gitlab 11.4.0-ee with plugin version
INFO: SonarQube Scanner 3.2.0.1227 INFO: Java 1.8.0_181 Oracle Corporation (64-bit) INFO: Linux 3.10.0-693.21.1.el7.x86_64 amd64 INFO: SONAR_SCANNER_OPTS=-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1 -XshowSettings:vm INFO: User cache: /root/.sonar/cache INFO: SonarQube server 7.3.0
I believe you need to set failure_notification_mode to exit-code
I'm running following command for my gitlab-sonarqube and getting Nullpointer exception.
./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.analysis.mode=preview -Dsonar.login=$SONAR_TOKEN -Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.disable_proxy=true -Dsonar.gitlab.ignore_certificate=true -Dsonar.branch.name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.failure_notification_mode=commit-status
Sonarqube - 7.5 GitLab - CI_SERVER_VERSION=11.7.3-ee sonar-gitlab-plugin-4.0.0
@manasatest can you post the entire error message with stack trace?
@BilelYahia Gitlab post-job commit issue publisher always fails with NullPointerException #215
I'm facing a different issues now. SonarQube failed to complete the review of this commit: Fail to request https://company.com/sonarqube/api/ce/task?id=XXXXXXXXXXXXXXX
@BilelYahia I could able to resolve the issue. Thanks for checking!
Would you mind explaining how you resolved it? I'm having the same error. :)
@jaymehoward We are using a http://sonar.company.com:port/sonarqube instead of actual https://company.com/sonarqube. It was able to publish the analysis to sonarqube but wasn't able to get them for gitlab ui. I've had the Server base URL configuration on sonarqube to https which caused the issue. Remove the base url configuration from your sonarqube server settings Configuration -> General -> Server Base URL.
I was facing a similar issue but it turned out to be just a permissions problem in the specific Gitlab repository being scanned. The "service account" sonarqube uses wasn't added to the repository / org i was trying to scan. After I added the account everything started working normally. Not sure if this is the case for others here but I thought I'd share this. Maybe it helps...
An update on mine, it turns out its the same as the issue for @unitysipu Recently switched to a different gitlab instance, which didn't have credentials setup properly for the instance of sonarqube I was using. Perhaps better error messaging could be added to the plugin for such cases, if its even detectable, and possibly still generate the artifacts? (what is concerning is that the scan still completed for me, though there might be permission issues with my sonarqube instance, still unrelated to the plugin)
I cannot get the plugin to work properly. The post-job will always fail and there are no artifacts generated. I've tried a few things and the configuration seems fine.
GitLab: 11.5.0 SonarQube: 7.4 (build 18908) gitlab-plugin: 4.0.0 (marketplace)
I'm using the .Net Core (MSBuild) analyzer: https://www.nuget.org/packages/dotnet-sonarscanner/
Error log (does not really reveal anything):
.gitlab-ci.yml call (PowerShell):