We are deploying a composited application, and would like to prevent files being overwritten in some circumstances.
We deploy as follows:
ComponentA to / (with purge)
ComponentB to / (without purge)
Most of the time ComponentB will be a unique set of files that don’t exist in ComponentA. In the case where there are clashes, we would like to option to not overwrite the ComponentA files, but simply add missing. Is this possible? If not could be have an Octopus variable setting to give us the desired behaviour?
Thanks for getting in touch! Could you tell me a bit about your deployment and files? I think the answer here is just no, unless you are deploying to Azure then it might be a maybe.
Octopus itself is designed around the practice of having all of your desired files in the packages, so we really don’t support not deploying files.
All I can think to suggest would be hacks or custom PowerShell.
How are you doing these deployments now? Is it all manual? Is it always the same files that might exist in component A and B or can this change?
We install ComponentA to the root of IIS with file system purge, and this contains the main IIS file system. We then deploy multiple components over the top, which contain additional layouts and assemblies for that component.
The issue is we want to ensure that if ComponentB contains duplicate assembly references, that it doesn’t overwrite the base files and regress the master assembly version in the root.
At the moment we deploy with Octopus and have some complex packaging logic to try and exclude the duplicate assemblies. It’s not very robust and better if we could just set a flag to tell Octopus not to overwrite files when deploying.
And I suppose that installing ComponentB first would be out of the question?
Unfortunately not as components run config transforms on the base.
It’s working quite nicely, it’s just this work particular problem. As I say we have a work around, but it’s not ideal. I appreciate this is an usual scenario which may be too unique to solve in Octopus itself.
Yeah it is a bit of an anti-pattern for us. You could float the suggestion on UserVoice, you may not be alone with this need.