Reputation: 51
I wanted to created a demo app that does automatic deployment. In other words once I check-in my code changes, the changes can be seen on the published website. I did the following steps:
Continuous Delivery
and Release Management
using TFS 2015 and created a build and release definitions from here;Copy File to
and Publish Artifacts
tasks, using file share
option to drop the contents to the publish folder I've created. So when I check-in my changes using TFS, the changes will be seen online.Here is the configuration for the build definition:
The folder in the file share path is shared to everyone, and the path is correct (when I type it in the browser, I can see the folder's contents).
The error I keep getting is the following:
Publishing build artifacts failed with an error: Unable to create directory '{p}'. Unable to verify the directory exists: '{testDir}'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share. \localhost\builddrop\drop \localhost\builddrop\drop
I've been trying to solve this for 2 days with no luck, but I could not find similar issues... I would like to know what is causing this error, or if you have any hints or tips that will get me closer to the solution.
Upvotes: 3
Views: 3789
Reputation: 31003
In your Publish Artifacts Task
, you've specified //localhost/builddrop/
in File share path
, which is not correct. You need to specify the File share path
as below:
\\servername\builddrop
Upvotes: 1
Reputation: 51
Thanks to @Maxsur answer I realized that I did not install a build agent, which is needed for in case you want to publish your code into a file share.
I did that by going to the team foundation server web portal clicked on the gear sign, and chose Agent Queues and followed the steps. Additionally you will also need to acquire a token by clicking on your profile icon then choosing security and add new token.
Reference: https://learn.microsoft.com/en-us/vsts/pipelines/agents/v2-windows?view=vsts
Upvotes: 2
Reputation: 46
Try to check (and change) an account for your build agent service. It can be found at Windows Services -> VSTS Agent on build machine (or TFS server if it used as build machine). This service can run under "local service" account, which cannot access network shares (even on local machine!). Try to change this account to Administrator (for example) or setup one by guidelines of MSDN
Upvotes: 1