I am going to integrate the sonarqube and Jenkins, So I just want to find the sonarqube is installed or not in my container(maven, oc jnlp).
Could anyone please share command for find the sonarqube version in the terminal
CodePudding user response:
Is it necessary to install sonarqube into JNLP? Or is sonarqube deployed separately in JNLP through sonar-scan.sh script accessing sonarqube
CodePudding user response:
No need to install sonarqube in JNLP. I was using the maven container then I got this error "bin/sonar-scanner: not found" later I have used JNLP container then I got the error below.
/home/jenkins/agent/workspace/nt_feature_docker-build@tmp/durable-d2b527d8/script.sh: line 1: bin/sonar-scanner: No such file or directory
So I want to find the sonar scanner executable path in my JNLP container and how to find it. Could you please help?
Complete code is below,
stage('SonarQube Scan') {
FAILED_STAGE = env.STAGE_NAME
container('jnlp') {
sh "export SONAR_SCANNER_OPTS=-Xmx8192m"
sonarResult = sonarqubeScan(
serverName: 'sonarqube',
sonarScannerExec: 'bin/sonar-scanner',
url: 'https://sonarqube.xyz.dev',
credentialsId: 'sonar_token',
overrideServerCreds: false,
projectKey: 'my-app',
sources: "$env.WORKSPACE/routing-registry-domain/src/",
retries: 5,
debug: true
)}}
