Hello,
I’m trying to set up my sonarqube server but it’s not working for some reason, in .m2/settings.xml I have specified
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>(hidden)</sonar.host.url>
<sonar.login>(hidden)</sonar.login>
</properties>
</profile>
I’m trying to integrate it with GitLab, so, in my .gitlab-ci.yml I added
sonarqube-check:
stage: sonarqube-check
variables:
SONAR_USER_HOME: ".sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
SONAR_HOST_URL: "$SONAR_HOST_URL"
SONAR_TOKEN: "$SONAR_LOGIN"
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
- .m2
script:
- 'mvn verify sonar:sonar -Dsonar.qualitygate.wait=true -s ci_settings.xml'
allow_failure: true
But it’s still looking for the https://locahost:9000 and fails with
SonarQube server [http://localhost:9000] can not be reached
What am I doing wrong? I don’t have experience with ci so I’m learning on the go
Thanks for help