我们正在使用hudson进行构建,我们发现如果我们使用master来进行构建,则不会加载perforce视图。控制台中没有错误,除非它是一个新项目,perforce插件似乎检测到错误的版本并尝试加载更改列表0.除此之外,运行主控制器上显示的完全相同的命令作为哈德森用户正常工作。这是在linux master上构建一个新项目的控制台输出(注意除了加载视图之外没有做任何事情。之后检查目录显示没有加载任何内容):
Started by user anonymous
Building on master
Clearing workspace...
Cleared workspace.
Using master perforce client: hudson_alec_test
[workspace] $ /usr/local/bin/p4 workspace -o hudson_alec_test
Last sync'd change: 0
[workspace] $ /usr/local/bin/p4 counter change
[workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@1,@5561
Sync'ing workspace to changelist 0 (forcing sync of unchanged files).
[workspace] $ /usr/local/bin/p4 sync -f //hudson_alec_test/...@0
Sync complete, took 259 ms
Finished: SUCCESS
一旦我将它绑定到我们的mac slave,这个项目的输出就没有了(除了将它绑定到slave之外没有项目配置的更改 - 注意现在perforce正确检测到更改并正确加载视图):
Started by user anonymous
Building remotely on xxx.xxx.xxx.xxx
Clearing workspace...
Cleared workspace.
Using remote perforce client: hudson_alec_test--yyy
[alec_test] $ /usr/local/bin/p4 workspace -o hudson_alec_test--yyy
[alec_test] $ /usr/local/bin/p4 login -p
[alec_test] $ /usr/local/bin/p4 -P xxx workspace -o hudson_alec_test--yyy
Changing P4 Client Root to: /Users/hudson/hudson_builds/workspace/alec_test/
Changing P4 Client View from:
//depot/... //hudson_alec_test--yyy/...
Changing P4 Client View to:
//depot/webservices/dev/projects/parents/... //hudson_alec_test-yyy/webservices/dev/projects/parents/...
Saving new client hudson_alec_test--yyy
[alec_test] $ /usr/local/bin/p4 -P xxx -s client -i
Last sync'd change: 0
[alec_test] $ /usr/local/bin/p4 -P xxx counter change
[alec_test] $ /usr/local/bin/p4 -P xxx -s changes //hudson_alec_test--yyy/...@1,@5561
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5554
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5552
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5551
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5550
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5213
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5211
Sync'ing workspace to changelist 5554 (forcing sync of unchanged files).
[alec_test] $ /usr/local/bin/p4 -P xxx sync -f //hudson_alec_test--yyy/...@5554
Sync complete, took 409 ms
Finished: SUCCESS
现在将其更改回主控制器输出是:(除了将其绑定到主服务器与从服务器之外,项目配置中没有任何更改,但现在主服务器上的工作空间中没有加载任何文件)
Started by user anonymous
Building on master
Clearing workspace...
Cleared workspace.
Using master perforce client: hudson_alec_test
[workspace] $ /usr/local/bin/p4 workspace -o hudson_alec_test
Last sync'd change: 5554
[workspace] $ /usr/local/bin/p4 counter change
[workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@5555,@5561
Sync'ing workspace to changelist 5554 (forcing sync of unchanged files).
[workspace] $ /usr/local/bin/p4 sync -f //hudson_alec_test/...@5554
Sync complete, took 229 ms
Finished: SUCCESS
我看到其他问题引用了perforce-hudson日志,但除了控制台中显示的内容之外,我找不到任何perforce日志记录。任何关于如何进一步调试的建议将不胜感激。
当我写这个问题时,我注意到在master上,perforce插件似乎没有像在slave上那样在日志中设置客户端视图。我不知道这是否与这个问题有关,但这是可疑的。
答案 0 :(得分:2)
您正在使用2个不同的客户端。您的奴隶看起来是由插件管理的,也许?因此,尽管您说没有什么不同,但您的客户却与众不同。注意[workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@1,@5561
,然后它同步到@ 0,这意味着它没有在该库中找到任何更改。您在第二次测试[workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@5555,@5561
中再次看到它,然后它同步到@ 5554。在@ 5555和@ 5561之间,您的仓库没有任何变化。最有可能的原因是两个客户之间的仓库路径不同?