ciricihq / gitlab-sonar-scanner

This project is no longer maintained
GNU General Public License v3.0
80 stars 62 forks source link

SonarQube localhost server unable to reach #48

Closed LiewJK closed 4 years ago

LiewJK commented 4 years ago

Hi, I'm beginner with sonarqube and gitlab-ci. Just realise this useful solution, but I'm facing an issue. I'm using local host SonarQube, been testing the script below:

sonar-qube:
  stage: sonar-qube
  image: ciricihq/gitlab-sonar-scanner
  variables:
    SONAR_URL: http://localhost:9000
    SONAR_ANALYSIS_MODE: publish
  script:
    - echo "sonar scan..."
    - gitlab-sonar-scanner
    - echo "testing..."

However, I'm receiving message like

ERROR: SonarQube server [http://localhost:9000] can not be reached

For your information, I have started up SonarQube server from terminal before the yml script run. Hope anyone from the community could provide advice in this matter. Thanks!

LiewJK commented 4 years ago

The issue has been solved by exposing the localhost server as well as removing of additional plugin downloaded from SonarQube marketplace.