Replace variables on files generated during a "process" step

My deploy steps create files which have octopus variables in them. As I understand it, variable replacement happens before the first process steps. Is there a PowerShell command to run variable replacement on a set of files. I could run this as a “process” step.

Hi Kirk,

Thanks for getting in touch. Take a look at the order we run these deployment features:

Perhaps you could generate the files in a custom PreDeploy.ps1 script which runs before the Variable Substitution.

Hope that helps!

Great idea. Thanks. It works.

Note I use sql server database tools (ssdt / sqlpackage.exe) to produce a custom upgrade.sql script for a particular environment.

Producing the file in predeploy.ps1 allows me to have octopus variables in upgrade.sql. This is pretty handy for sql jobs that call other exe’s.

Octopus is a great tool.

Hi Kirk,

Fantastic news, I’m glad that worked out, and thanks for your kind feedback.

Happy Deployments!