Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS error: "Publishing build artifacts failed with an error: Unable to create directory '{p}'

I have created a folder on my localhost and shared it by giving all the permissions.

Now inside the Build Definition, i have used the "Publish Artifact" and configured it as shown in the below screenshot:

enter image description here

Error: I am getting error during the build process to publish the artifact on the respective location. The error is shown in the below screenshot:

enter image description here

Any help will be greatly appreciated. Thanks in advance.

like image 369
Shubham Khandelwal Avatar asked Oct 17 '22 18:10

Shubham Khandelwal


1 Answers

The Publish Artifact build task runs on a build agent. That build agent cannot address a file share on your localhost as \\localhost\something. You should use the name of your host which is available on the network, e.g. \\mylaptop\publicshare.

In fact, if the build agent is a VSTS hosted agent, it will not be able to see your file share unless it is visible on the internet. Basically, this is what the error message is about:

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.

like image 95
Yan Sklyarenko Avatar answered Oct 21 '22 04:10

Yan Sklyarenko