When Octopus deploys packages, it runs a series of actions implementing the conventions or features enabled for that step.

The order of evaluation once the package is extracted is:
- BeforePreDeploy.* Feature Scripts – runs matching scripts associated with any enabled features. These bootstrap scripts are created by Octopus and cannot be customized by the user.
- PreDeploy.* Scripts – runs matching scripts included in the package or defined using the Custom PowerShell Scripts feature.
- AfterPreDeploy.* Feature Scripts – runs matching scripts associated with any enabled features. These bootstrap scripts are created by Octopus and cannot be customized by the user.
- Delete temporary package files
- Substitute Octopus Variables in files- if the variable substitution feature is enabled, perform substitution in listed files.
- XML Configuration Transforms- if the feature is enabled, find and apply matching XML transforms.
XML Configuration Variables – if the feature is enabled, find and replace matching appSettings, applicationSettings, and connectionStrings values. - Custom Installation Folder copy- if the custom installation folder feature is enabled, copy files to the folder.
- BeforeDeploy.* Feature Scripts- runs matching scripts associated with any enabled features. These bootstrap scripts are created by Octopus and cannot be customized by the user.
- Deploy.* Scripts- runs matching scripts included in the package or defined using the Custom PowerShell Scripts feature.
- AfterDeploy.* Feature Scripts- runs matching scripts associated with any enabled features. These bootstrap scripts are created by Octopus and cannot be customized by the user.
- IIS Home Directory – sets the IIS web site’s home directory to the new install location, if that feature is enabled.
- BeforePostDeploy.* Feature Scripts- runs matching scripts associated with any enabled features. These bootstrap scripts are created by Octopus and cannot be customized by the user.
- PostDeploy.* Scripts- runs matching scripts included in the package or defined using the Custom PowerShell Scripts feature.
- AfterPostDeploy.* Feature Scripts- runs matching scripts associated with any enabled features. These bootstrap scripts are created by Octopus and cannot be customized by the user.
If an item fails, the remaining items will not be executed, and instead DeployFailed.* Scripts will be found and executed.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals