Reputation: 343
I'm working with Azure DevOps for the first time and I'm trying to complete my build/release pipeline. I'm working with a Node.js/Angular frontend application and I want to publish the files from the /dist file onto a remote server within my network.
I have the files I need being built and zipped up, but I'm running into trouble copying the files over to my server. I'm using a Windows Machine File Copy task. The machine is located in my network, not Azure, so it feels like that is the problem and it makes sense why I can't just do a copy.
I am getting the following: Failed to Create PSDrive with Destination: '\my_server_name\d$\webapps\test' The network path not found
What should I be doing instead?
Upvotes: 0
Views: 2673
Reputation: 59035
If you're using a self-hosted agent that resides within your network, then Windows Machine File Copy will create a temporary share to use to copy files. You specify the path on the target machine to use, such as D:\ArtifactStaging
.
If you're using the Microsoft-provided host agent, then there's no way you can copy files to your on-prem server, unless that on-prem server is accessible over the internet and has appropriate ports open, which I would not recommend. You'll have to install a private, self-hosted agent that resides within your network.
Upvotes: 1