How to set user account to run build runner in Team City
I have a separate build configuration used to deploy built files. This configuration uses command line build runner. I have a bat file that copies output files to another computer share. The output file开发者_如何学Pythons are produced by other build configuration. The problem is that when team city executes Windows XP copy command i get access denied error. How can I set user account for selected build runner? Or what is the correct way to deploy build files?
You could configure the TeamCity service account to run under an appropriate privileged domain account which has Change/Write access to the share.
Alternatively, roll your own Copy MSBuild task that performs impersonation based on a few extra parameters.
Check out the MSDN docs on creating an MSBuild task, you can inherit from Task
and then implement the Execute()
method.
精彩评论