Meu ambiente de estudo é este:
- Jenkins ver. 2.190.1 - container oficial (docker) ;
- SonarQube ver 7.9.1 - container oficial (docker);
- SonarQube Scanner : sonar-maven-plugin:3.7.0.1746
- apache-maven-3.6.2-bin.tar.gz - dentro do container do Jenkins;
Durante o curso eu tive problemas com o jdk no linux e por conta disso, estou usando a imagens em docker. Nessa troca acredito que eu tenha feito todos os passos do curso.
Seguindo a aula Integrando Jenkins com Sonar, ao construir o projeto argentum-web ocorre o erro abaixo:
[INFO]
[INFO] --- maven-pmd-plugin:3.6:pmd (default) @ argentum-web ---
[WARNING] Unable to locate Source XRef to link to - DISABLED
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.6.201602180812:report (default) @ argentum-web ---
[INFO] Analyzed bundle 'argentum-web' with 12 classes
[INFO]
[INFO] --- maven-failsafe-plugin:2.19.1:verify (default) @ argentum-web ---
[INFO]
[INFO] ----------------< br.com.caelum.argentum:argentum-web >-----------------
[INFO] Building argentum-web 1.0.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:3.7.0.1746:sonar (default-cli) @ argentum-web ---
[INFO] User cache: /var/jenkins_home/.sonar/cache
[ERROR] SonarQube server [http://127.0.0.1:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:27 min
[INFO] Finished at: 2019-10-02T18:40:30Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project argentum-web: Unable to execute SonarQube: Fail to get bootstrap index from server: Status returned by url [http://127.0.0.1:9000/batch/index] is not valid: [503] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeeded?
[DeployPublisher][INFO] Build failed, project not deployed
Sending e-mails to: tiagomunhoz@djsystem.com.br
Finished: FAILURE