I have Gitlab Community and I am trying to integrate it with SonarQube. The Sonar is hosted on Azure VM Ubuntu in a Docker container. The problem is that I really don't know how to write gitlab-ci.yml
. I already try sonar, but locally hosted on a Windows machine. Here is my current gitlab-ci.yml
.
When I change sonar host with my current and I am not sure what I need to put on sonar. Login then throws an error:
SonarScanner for MSBuild 5.0.4
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
18:35:07.168 Updating build integration targets...
18:35:07.394 The token you provided doesn't have sufficient rights to check license.
sonar-check:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
dependencies:
- build
script:
- choco install sonarqube-scanner.portable
- SonarScanner.MSBuild.exe begin /k:"somefile" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="8f6658e7684de225a4f45c7cf3466d462a95c1c7"
- nuget restore -ConfigFile .\nuget.config
- MsBuild.exe ./Process /t:Rebuild
- SonarScanner.MSBuild.exe end /d:sonar.login="8f6658e7684de225a4f45c7cf3466d462a95c1c7"
only:
- merge_requests
- master
- develop
- GitLabQualityTool