Hudson continuous integration server: how to see Windows mapped directories that are visible to Ant?

本秂侑毒 提交于 2019-12-06 13:30:01

I assume you're running hudson as a windows service. The service environment is somewhat different to a normal user, for instance it will have minimal or no network priveleges. Also, drive mapping happens during logon and is specific to the user session - so services can't really see these drives, as the services may still need to run after the user has logged off and the drives unmapped.

You can try configuring the hudson service to use an account with network priveleges, and change the build scripts to use UNC paths (\server type paths)

The other alternative is to do builds in slaves which are running from a logged in user account. It'll work, but it's nasty.

Some links with useful info:

  1. INFO: Services and Redirected Drives
  2. Descriptions of some best practices when you create Windows Services

Jim T, thank you very much for your excellent answer!

To summarise, on Windows, the Tomcat instance needs to have privileges to the Windows mapped drive (one solution to run Tomcat under a user account with these privileges), and UNC paths must be used (//remote_server_name/directory_path). On Linux, a remotely mounted Windows drive can work (using mount command).

I did not try the second suggestion of doing builds in slaves.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!