我在使用P4插件在Jenkins中同步文件时遇到问题。我的P4插件配置为: 工作区行为:手动,Clobber类型可写 填充选项:自动清除和同步,选中替换丢失/修改的文件以及安静的perforce消息。 因此,当我建立工作并尝试同步工作区中的文件时,会得到以下控制台输出:
Building in workspace /home/mateusz/Perforce/mczer_jenkins_depot
... p4 client -o mczer_jenkins_depot +
... p4 info +
... p4 info +
... p4 client -o mczer_jenkins_depot +
... No change in client detected.
... p4 counter change +
... p4 changes -m1 -ssubmitted //mczer_jenkins_depot/... +
... p4 repos -C +
Building on Node: master
... p4 client -o mczer_jenkins_depot +
... p4 info +
... p4 info +
... p4 client -o mczer_jenkins_depot +
... No change in client detected.
P4 Task: establishing connection.
... server: perforce-wro.dolby.net:1666
... node: mateusz-VirtualBox
P4 Task: reverting all pending and shelved revisions.
... p4 revert /home/mateusz/Perforce/mczer_jenkins_depot/... +
... rm [abandoned files]
duration: (20ms)
P4 Task: cleaning workspace to match have list.
... p4 reconcile -w -f -e -d /home/mateusz/Perforce/mczer_jenkins_depot/... +
duration: (17ms)
P4 Task: syncing files at change: 4999572
... p4 sync -q /home/mateusz/Perforce/mczer_jenkins_depot/...@4999572 -
p4 sync -q /home/mateusz/Perforce/mczer_jenkins_depot/...@4999572
... totalFileSize 29219346999
... totalFileCount 33325
P4 Task: attempt: 1
ERROR: P4: Task Exception: com.perforce.p4java.exception.ConnectionException: Unexpected exception in ClientSystemFileCommands.openFile: nulljava.lang.NullPointerException
Finished: FAILURE
答案 0 :(得分:1)
当p4插件无法打开待同步的文件进行写入时,您会得到这个无济于事的错误。
一个可能的原因是操作系统权限。例如,您过去以“ root”身份启动jenkins,但现在以“ mateusz”用户身份运行它。
因此,请检查/ home / mateusz / Perforce / mczer_jenkins_depot的所有权。 jenkins处理用户可以写入它以及下面的所有目录/文件吗?