A project that I am updating has a true/false flag app setting in my web.config file that is used to indicate that the website is down for maintenance. After we verify that everything is running as expected, I would like to flip this flag in the web.config file. Is this possible?
I tried setting up a “Manual Intervention” step and I set the variable scope to that step role. However the value that I want to update is in a web.config file that was deployed in a prior step. Is there a way to update a file already deployed?
Thanks for getting in touch! I think you are on the right track.
Your deployment process can look like this:
Step1 deploys application and flips the flag to false
Step2 (Manual Intervention) stops the deployment so it can be verified
Step3 (Run a Script) uses an output variable Octopus.Action[Step1].Output.Package.InstallationDirectoryPath to locate the web.config and flips the flag to true
I started to build a script step to what you suggested after the Manual Intervention step. However I decided to just duplicate the earlier website deployment step and add a new variable scoped to that process step number. This way I don’t have to maintain any custom script code.