JetBrains / teamcity-bazel-plugin

TeamCity plugin for Bazel build system
Apache License 2.0
14 stars 6 forks source link

Plugin should start Bazel process elevated on Windows #17

Open konste opened 3 years ago

konste commented 3 years ago

Bazel loves symlinks and uses them very often. By default on Windows Bazel uses file copy instead of symlinks, but can use real symlinks when startup option --windows_enable_symlinks is specified.

In our case Windows build agents use Windows Server 2016 and for the process to be allowed creating symlinks it must be run elevated. The user which runs TeamCity agent has admin permissions, but unfortunately it is still necessary for this plugin to start Bazel process elevated for the symlinks to work.

It seems the optimal behavior for the plugin is to use "highest available" permission, i.e. elevate when the user is an admin and run as a regular user otherwise.