Getting Error "ERROR: SonarQube server [] can not be reached" While Triggering Pipeline .
But I can access "http://PrivateIp:9000/" From my browser .
Both the gitlab runner & sonarqube hosted on same machine .
Configured all the steps accordingly .
Gitlab.yaml
sonarqube-check:
stage: scan
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.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_PROJECT_KEY: "<YOUR PROJECT KEY>"
SONAR_PROJECT_NAME: "$CI_PROJECT_NAME"
SONAR_PROJECT_VERSION: "$CI_BUILD_ID"
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- pwd
- docker run --rm -e SONAR_HOST_URL="" -e SONAR_LOGIN="" -v "/home/projects/project1:/usr/src"
sonarsource/sonar-scanner-cli:latest
sonar.projectKey=""
sonar-scanner.properties
SONAR_HOST_URL=""
SONAR_LOGIN=""
sonar.project.settings=sonar-project.properties
sonar-project.properties
SONAR_PROJECT_KEY=e2co
SONAR_PROJECT_NAME=e2co
SONAR_PROJECT_VERSION=1.0
sonar.qualitygate.wait=true
#sonar.sources=.
sonar.sourceEncoding=UTF-8
Can any one suggest what is problem & how it could be resolved