Sonar runner Jenkins的执行失败

时间:2015-01-20 23:50:47

标签: jenkins sonarqube sonar-runner

我正在尝试在Jenkins上配置Sonar插件,在jenkins上执行此SonarJob会导致错误。输出控制台表示导致此错误的内容。正在寻找调试此问题的方法。

- 有关安装程序的一些信息 - > SonarJob工作区从另一个Job复制 - >在詹金斯配置声纳和声纳跑步者>配置系统 - > Sonar Build Step由"触发独立声纳分析"触发。 。输出控制台日志如下

提前致谢! LOKESH

Started by user cheetahb@ca.ibm.com
[EnvInject] - Loading node environment variables.
Building on master in workspace /drv-cheetbld3_1/pipeline/jenkins/jobs/SonarQube1/workspace
Copied 2,820 artifacts from "BI-Pattern_3.0_build" build number 41
[workspace] $ /home/cheetahb/sonarhome/bin/sonar-runner Sonar_5.0_new -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://9.37.213.8:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance ******** ******** -Dsonar.host.url=http:// vottlokesh. ottawa.ibm.com:9000/ -Dsonar.projectBaseDir=/drv-cheetbld3_1/pipeline/jenkins/jobs/SonarQube1/workspace -Dsonar.projectName=biPattern3.0 -Dsonar.projectVersion=1.0 -Dsonar.projectKey=biproject -Dsonar.verbose=true -Dsonar.sources=/drv-cheetbld3_1/pipeline/jenkins/jobs/SonarQube1/workspace
SonarQube Runner 2.4
Java 1.7.0_65 Oracle Corporation (64-bit)
Linux 2.6.32-431.20.5.el6.x86_64 amd64
INFO: Runner configuration file: /home/cheetahb/sonarhome/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: SonarQube Server 5.0
18:23:43.161 INFO  - Load global referentials...
18:23:43.181 DEBUG - Download: http:// vottlokesh.ottawa.ibm.com:9000/batch/global (no proxy)
18:23:43.926 INFO  - Load global referentials done: 768 ms
18:23:43.932 INFO  - User cache: /home/cheetahb/.sonar/cache
18:23:43.947 INFO  - Install plugins
18:23:43.947 DEBUG - Download index of plugins
18:23:43.947 DEBUG - Download: http:// vottlokesh.ottawa.ibm.com:9000/deploy/plugins/index.txt (no proxy)
18:23:44.066 INFO  - Install JDBC driver
18:23:44.066 DEBUG - Download index of jdbc-driver
18:23:44.067 DEBUG - Download: http:// vottlokesh.ottawa.ibm.com:9000/deploy/jdbc-driver.txt (no proxy)
18:23:44.079 INFO  - Create JDBC datasource for jdbc:mysql://9.37.213.8:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
18:23:45.834 DEBUG - Testing JDBC connection
18:23:48.209 DEBUG - Download: http:// vottlokesh.ottawa.ibm.com:9000/api/server (no proxy)
18:23:48.523 INFO  - Initializing Hibernate
18:23:48.526 DEBUG - hibernate.generate_statistics: false
18:23:48.527 DEBUG - hibernate.dialect: org.sonar.core.persistence.dialect.MySql$MySqlWithDecimalDialect
18:23:48.527 DEBUG - hibernate.connection.provider_class: org.sonar.jpa.session.CustomHibernateConnectionProvider
18:23:50.751 DEBUG - Loaded 2689 properties from l10n bundles
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 8.801s
Final Memory: 35M/355M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Task Sonar_5.0_new does not exist
ERROR: 
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
Finished: FAILURE

1 个答案:

答案 0 :(得分:3)

您必须删除在Jenkins作业配置中Sonar_5.0_new字段上设置的Task to run标签。