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_HOST_URL="" SONAR_LOGIN="" sonar.project.settings=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
@Kirupa Cse hi.
Maybe it's a good idea to use SonarCloud pipe for this case.
- pipe: sonarsource/sonarcloud-scan:1.4.0 variables: EXTRA_ARGS: -Dsonar.projectDescription=\"Project with sonarcloud-scan pipe\" -Dsonar.eslint.reportPaths=\"report.json\" SONAR_SCANNER_OPTS: -Xmx512m DEBUG: "true"
Cheers.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.