1
votes

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.NET

Core-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.

3
Are you using a private agent or a hosted agent? - Daniel Mann
Hi Daniel Mann, I am using hosted agent 'Azure Pipelines', not found any solution on internet for this error, Can you help me plz - Ashish Verma
@Ashish Verma Did you tried below answers? Any updates for this case? - Levi Lu-MSFT

3 Answers

1
votes

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.

1
votes

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!

1
votes

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.