我正在尝试使用perforce SCM创建一个jenkins工作。 Sonar Runner用于分析项目,这将使我在分析项目时获得成功。
问题在于perforce jenkins插件没有从perforce中检出代码,因此在不检查perforce代码的情况下运行声纳分析。
Started by user jones j alapat [EnvInject] - Loading node environment variables. Building on master in workspace C:\Program Files (x86)\Jenkins\jobs\perforceSpringPOC\workspace Using master perforce client: mar30 [workspace] $ "C:\Program Files\Perforce\p4.exe" workspace -o mar30 Changing P4 Client Root to: C:\Program Files (x86)\Jenkins\jobs\perforceSpringPOC\workspace Saving modified client mar30 [workspace] $ "C:\Program Files\Perforce\p4.exe" -s client -i Last build changeset: 42 [workspace] $ "C:\Program Files\Perforce\p4.exe" changes -s submitted -m 1 //mar30/... [workspace] $ "C:\Program Files\Perforce\p4.exe" -s changes -s submitted //mar30/...@43,@42 Sync'ing workspace to changelist 42. [workspace] $ "C:\Program Files\Perforce\p4.exe" -s sync //mar30/...@42 Sync complete, took 36 ms [workspace] $ D:\softwares\sonar-runner-2.4\bin\sonar-runner.bat -Dsonar.jdbc.driver=com.mysql.jdbc.Driver "-Dsonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8" ******** ******** -Dsonar.host.url=http://localhost:9000 ******** ******** "-Dsonar.projectBaseDir=C:\Program Files (x86)\Jenkins\jobs\perforceSpringPOC\workspace" -Dsonar.projectName=Mar30SpringMVCPOC -Dsonar.projectVersion=1.0 -Dsonar.projectKey=Mar30SpringMVCPOC -Dsonar.sources=. D:\softwares\sonar-runner-2.4 SonarQube Runner 2.4 Java 1.8.0_11 Oracle Corporation (64-bit) Windows 8.1 6.3 amd64 INFO: Runner configuration file: D:\softwares\sonar-runner-2.4\conf\sonar-runner.properties INFO: Project configuration file: NONE INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent) INFO: Work directory: C:\Program Files (x86)\Jenkins\jobs\perforceSpringPOC\workspace\.sonar INFO: SonarQube Server 5.0 11:49:16.269 INFO - Load global referentials... 11:49:16.398 INFO - Load global referentials done: 129 ms 11:49:16.402 INFO - User cache: C:\Windows\system32\config\systemprofile\.sonar\cache 11:49:16.408 INFO - Install plugins 11:49:16.475 INFO - Install JDBC driver 11:49:16.475 INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8 11:49:17.232 INFO - Initializing Hibernate 11:49:18.094 ERROR - No license for plugin report 11:49:18.251 INFO - Load project referentials... 11:49:19.123 INFO - Load project referentials done: 872 ms 11:49:19.124 INFO - Load project settings 11:49:19.459 INFO - Loading technical debt model... 11:49:19.475 INFO - Loading technical debt model done: 16 ms 11:49:19.475 INFO - Apply project exclusions 11:49:19.590 WARN - SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project. 11:49:19.605 INFO - ------------- Scan Mar30SpringMVCPOC 11:49:19.609 INFO - Load module settings 11:49:20.159 INFO - Loading rules... 11:49:20.298 INFO - Loading rules done: 139 ms 11:49:20.318 INFO - Configure Maven plugins 11:49:20.372 INFO - Compare to previous analysis (2015-03-30) 11:49:20.378 INFO - Compare over 30 days (2015-02-28, analysis of 2015-03-30 11:37:50.0) 11:49:20.379 INFO - No quality gate is configured. 11:49:20.475 INFO - Base dir: C:\Program Files (x86)\Jenkins\jobs\perforceSpringPOC\workspace 11:49:20.475 INFO - Working dir: C:\Program Files (x86)\Jenkins\jobs\perforceSpringPOC\workspace\.sonar 11:49:20.475 INFO - Source paths: . 11:49:20.475 INFO - Source encoding: windows-1252, default locale: en_US 11:49:20.475 INFO - Index files 11:49:20.475 INFO - 0 files indexed -------------------------No Files Are pulled from perforce 11:49:20.490 INFO - Sensor QProfileSensor... 11:49:20.506 INFO - Sensor QProfileSensor done: 16 ms 11:49:20.506 INFO - Sensor InitialOpenIssuesSensor... 11:49:20.520 INFO - Sensor InitialOpenIssuesSensor done: 13 ms 11:49:20.520 INFO - Sensor ProjectLinksSensor... 11:49:20.524 INFO - Sensor ProjectLinksSensor done: 4 ms 11:49:20.525 INFO - Sensor VersionEventsSensor... 11:49:20.661 INFO - Sensor VersionEventsSensor done: 136 ms 11:49:20.661 INFO - Sensor FileHashSensor... 11:49:20.661 INFO - Sensor FileHashSensor done: 0 ms 11:49:20.661 INFO - Sensor SCM Sensor... 11:49:20.661 INFO - No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it. 11:49:20.661 INFO - Sensor SCM Sensor done: 0 ms 11:49:20.661 INFO - Sensor CPD Sensor... 11:49:20.661 INFO - Sensor CPD Sensor done: 0 ms 11:49:20.742 INFO - Execute decorators... 11:49:20.839 INFO - Store results in database 11:49:21.043 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/Mar30SpringMVCPOC 11:49:21.043 INFO - Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report. 11:49:21.043 INFO - Executing post-job class org.sonar.issuesreport.ReportJob 11:49:21.044 INFO - Executing post-job class org.sonar.plugins.issueassign.notification.SendIssueNotificationsPostJob 11:49:21.044 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob 11:49:21.044 INFO - Executing post-job class org.sonar.plugins.buildbreaker.AlertBreaker 11:49:21.060 INFO - Executing post-job class org.sonar.plugins.buildbreaker.ForbiddenConfigurationBreaker INFO: ------------------------------------------------------------------------ INFO: EXECUTION SUCCESS INFO: ------------------------------------------------------------------------ Total time: 5.384s Final Memory: 12M/183M INFO: ------------------------------------------------------------------------ Notifying upstream projects of job completion Finished: SUCCESS
如您所见,我的perforce中的文件未被检出。
我的配置如下:
答案 0 :(得分:0)
它看起来不像' p4同步'命令发出任何错误。
也许你已经跑过&#p; p4 sync'对于此工作空间中的那些文件,但随后从工作站中删除了这些文件。在这种情况下,由于Perforce认为您已经拥有这些文件(它不知道您是从工作站中删除了这些文件),因此您必须运行“p4 sync -f'将文件恢复到工作站上。