Dejulia489 / WindowsServiceManager

https://marketplace.visualstudio.com/items?itemName=MDSolutions.WindowsServiceManagerWindowsServiceManager
MIT License
11 stars 9 forks source link

Failed to copy artifacts on TargetMachine #32

Closed git-heavy closed 4 years ago

git-heavy commented 4 years ago

VSTS agent run on and in Agent Phase of release I added task with "TargetMachine" parameter set to . Also I set "Artifact Path" to "$(System.DefaultWorkingDirectory)/TfsWebHookHandler/service". When release started, service successfully identified on but failed while trying to copy binaries from artifacts directory to target service directory.

2020-05-15T13:43:26.3751327Z Begining deployment to [ORPIHOST]
2020-05-15T13:43:27.6935243Z [ORPIHOST]: Attempting to locate [TfsWebHookHandler]
2020-05-15T13:43:27.6938617Z [ORPIHOST]: Stopping [TfsWebHookHandler]
2020-05-15T13:43:27.6940545Z [ORPIHOST]: Identified [TfsWebHookHandler] installation directory [D:\_Utils\TfsWebHookHandler]
2020-05-15T13:43:27.6942622Z [ORPIHOST]: Copying [D:\Builds\Agent5\r1\a\TFS Web Hook Handler\service] to [D:\_Utils\TfsWebHookHandler]
2020-05-15T13:43:27.9577476Z ##[error]Cannot find path 'D:\Builds\Agent5\r1\a\TFS Web Hook Handler\service' because it does not exist.

It seems like agent trying to copy from local path to local path on remote machine. Why not copy to remote machine from build machine?

Dejulia489 commented 4 years ago

Use a copy files task for agents, or use a deployment group and let the agent copy the files to the server for you.

jabteles commented 4 years ago

I also have this suggestion from @git-heavy , I also tried to use the $(System.DefaultWorkingDirectory) for "Artifact Path" so we wouldn't need for an extra custom step to copy the files to a temporary folder on the destination server before actually running the "Windows Service Manager" task.

Dejulia489 commented 4 years ago

Network copies are not the same as local copies. In most cases they require authentication. The task is not configured for it at this time. I would be happy to review a pull request with this feature if one gets submitted.

Dejulia489 commented 4 years ago

Closing this issue, let me know if you need some more assistance.