My actual deploy system does a copy of the files to the destination sever(s) by doing a mirror copy with msdeploy or robocopy.
I can specify to not touch some files or folders. (like the log folder, or some nasty configuration files that cannot be touched on the server)
- Does Octopus deploy the package incrementally or does it delete the old files as well? (mirror copy)
- is it possible to specify to not delete some folder or some specific file?
By default Tentacle will deploy each package to a new folder - e.g.,:
You can define a special variable named OctopusPackageDirectoryPath to tell Tentacle to copy the package contents somewhere else. For example:
OctopusPackageDirectoryPath = C:\MyWebSite
By default Tentacle will override the existing files, but won’t delete any other files. If you want them to be deleted, there’s an additional variable you can define to control that.
One thing you must do however is to make sure the existing files aren’t in use. The easiest way to do that is by creating a PreDeploy.ps1 script that stops any services which may be using them. Tentacle will execute that script prior to deployment.
For more information on variables:
And for more on PowerShell:
Hope that helps,