Detect modified files that will be purged

We have older web projects that we are migrating to octopus. These projects unfortunately write user content to the same folder the site code is in.

I already use the “exclude from purge” option to leave these directories alone. However, I’m worried something is going to get missed so I’m trying to create a safety net.

I plan on writing a pre-deployment powershell script to look for changed files that are not in excluded purge folders and halt the deployment if I find one.

Couple of questions.

What should be my point of reference for time? My first thought is that I can write out a file with a date in it with a post deployment script to the app directory. Is this the best option or does octopus already have a “last deployment complete” timestamp in a variable somewhere?

What mechanism can I use to force the deployment anyway? If the user decides that the deployment should proceed (ie somebody just temporarily changed a web.config value that can be overwritten), how can I allow that? Either something to let that deployment continue or a subsequent deployment continue. In the case of a subsequent deployment, i wouldn’t want that permission to last for more than one deployment. I suppose i could use a prompt variable. Are there any other options?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.