Suggestion for best approch to comparing appsettings and variables at deploy time

One of the ideas we’ve been looking at internally is validating that all AppSettings are replaced by variables in octopus and halting a deploy if this is not the case. This is an attempt to prevent development variables form entering production by making sure they are all set with some value or another.

I am guessing we would have to build this into a PreDeploy.ps1 inside the project so its go access to the web.config file

But would prefer to do this with a shared step so we can easily reuse it on all of our projects, but i’m not sure how we would get a shared step to access the web.config file in another step or multiple other steps before that step runs, is this possible? has anyone else done this or something similar that could offer advice?


Hi Joel,

Thanks for the question. You might want to check out this step template which will check for variables that have not been replaced:!/step-template/actiontemplate-variables-find-unreplaced

Is that the sort of thing you wanted to do?


Spot on mate, thanks!