You can specify a custom installation directory for package and IIS steps. The custom installation directory feature deploys your package to a specific location on the target server. This feature helps when you are using a Content Management System (CMS) or another coordinating application that requires your files to be in specific locations.
Only use the custom installation directory feature when you really need it.
The standard convention for deploying packages eliminates problems caused by file locks and stale files being left in the deployment folder. It also provides smoother deployments and less downtime for Windows Services and Web Applications, so before you configure a custom installation directory, review the package deployment convention and package deployment feature ordering to be certain that you need to configure a custom installation directory.
Add a Custom Installation Directory
- From your Package Deploy or IIS step, click the Configure Features link.
- Check the Custom Installation Directory checkbox and click Ok.
When you return to your deployment process, you will see the Custom Install Directory option had been added to the Features section.
- Expand the Custom Install Directory.
- You can enter the directory as the path to the directory, or you can insert a variable if you have defined the path as a variable.
Defining a variable with the directory path, means you can scope different values to different environments. For instance:
Read more about variables.
- If you would like to remove existing files from the custom installation directory before your deployed files are copied to it, check the Purge checkbox.
- If there are files you would like to exclude from the purge, add the files and directories you want to keep to the Exclude from purge list. This feature was introduced in
The Exclude from purge list must be a newline-seperated list of file or directory names, relative to the installation directory. To exclude an entire directory specify it by name without a wildcard. Extended wildcard syntax is supported. for instance:
How the Packages are Deployed
Our Packages are extracted into a new directory each time (along the lines of C:\Octopus\Applications\[Environment name]\[Package name]\[Package version]) , and this is no different for Custom Installation Directory.
We make the assumption that when you are using a Custom Installation Directory it has a working copy of an existing website or application. So to blindly extract the new package in your existing directory, without first completing any transformations, or variable substitutions could potentially break your application or website. So even when you are using the Custom Installation Directory feature, we extract the package to the above listed directory and perform all transformations and substitutions.
And after substitution and transformation your files are moved.
Read more about the Ordering of Package Features.