[英]Unable to check in files to perforce from Jenkins node
我們正在為Jenkins編寫一個新插件,其中一項要求涉及將生成的文件上傳到perforce。 如果我的文件位於主服務器上,而我的文件位於從屬代理(Jenkins節點)上,則我可以提交給perforce。 錯誤:找不到文件。 我們確實嘗試過使用FilePath。 我們懷疑這是因為客戶端是由主服務器創建的。 這是代碼:
IOptionsServer srvr = ServerFactory.getOptionsServer("p4java://" + Port, null);
srvr.connect();
srvr.setUserName(User);
srvr.login(Password);
IClient client = new Client(srvr);
client.setName(tmpClientName);
client.setRoot(source.getRemote());
client.setOwnerName(p4User);
client.setServer(srvr);
client.setStream("StreamName");
ClientView mapping = new ClientView();
mapping.addEntry(new ClientView.ClientViewMapping(0,destination, "//" + tmpClientName + "/" + source.getName()));
client.setClientView(mapping);
try{
srvr.createClient(client);
srvr.setCurrentClient(client);
}
任何人都可以幫助如何從節點創建客戶端嗎? 或其他任何見解?
如果您包括所得到的錯誤,這將很有幫助。 默認情況下,當您創建Perforce客戶端時,它將“主機:”字段設置為在其上創建的主機名,這將其使用限制在該主機上。 查看正在生成的客戶端,並查看是否設置了該字段。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.