I have a windows application that I am building and packaging and sending to the Octopus Deploy build in package feed.
I am now working on getting that package deployed to a Network Share (on our local network). I am struggling to find a template to do this. I looked at the Deploy a Package template, but it wants to run on the “Deployment Target” (It seems this cannot be changed). Since I am copying to network file share, I don’t really have a “Deployment Target”.
I tried using a Powershell Script to just copy the files, but ended up having lots of problems with mapping a PS Drive (in order to have the needed credentials).
Does Octopus Deploy have a supported way to deploy a package to a network file share? (Using a UNC path like \\MyNetworkShare\SomeLocation\MyApp)
Thank you for reaching out, and I would be happy to help with your questions on deploying to a network file share via Octopus Deploy!
In doing some initial thinking on this, a Run-A-Script step with a referenced package seems like the best approach for this scenario. We have a nice blog post on referencing packages via script steps, which I’ll link for your reference/review since it goes into this topic in great detail:
Typically I’ll use Robocopy in these scenarios, but Robocopy has some file name length limitations, so sometimes XCopy can be a more robust solution in these cases.
I’ve also run into some personal headaches in dealing with the exit codes from Robocopy (as they aren’t super intuitive), so I wanted to include some information on this from a StackOverflow post I found, in case you run into similar issues (if you end up using Robocopy):
I hope this initial information helps, but let me know if I can be of any more assistance.