Reputation: 127
Publish artifacts task configured as file share path but it doesn't publish any code throwing error:
[error]Publishing build artifacts failed with an error: Unable to create directory '\INDLBCKPF1MXWMV\Publish\AshishVerma-ASP.NETCore-CI\drop'. Unable to verify the directory exists: '\INDLBCKPF1MXWMV\Publish\AshishVerma-ASP.NET Core-CI\drop'. 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.
Upvotes: 1
Views: 1557
Reputation: 127
I have completed it by created Private Agent for windows OS in project settings section with enter new agent name and followed the steps suggested by Azure to activate newly created agent, if it will not activate then it will show as offline status otherwise it will be shown as green status. Then go for CI pipeline to configure build process and at last configure CD pipeline to copy the publish code on local system path by using Windows machine file copy task.
Upvotes: 1
Reputation: 30313
You can think of what Publishing build artifacts task actually does is to copy the contents in artifacts folder you defined in Path to publish
field to a place in azure devops server.
So you can just have a try using a copy task to copy the contents in artifacts folder to your share file path. There are multiple copy tasks available.
For example: Remote Copy task and Windows machine file copy task. You can just replace Publishing build artifacts task with one of the copy task.
Hope you find above helpful and good luck!
Upvotes: 1
Reputation: 58980
You are using the hosted agent. The hosted agent does not have access to your on prem network.
Publish the artifacts to Azure DevOps instead of to a file share.
Upvotes: 1