Update a config value set in a prior step

Hi,

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,
John

Hi John,

Thanks for getting in touch! I think you are on the right track.

Your deployment process can look like this:

  1. Step1 deploys application and flips the flag to false
  2. Step2 (Manual Intervention) stops the deployment so it can be verified
  3. 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

Please let me know how you go.

Regards,

Pawel

Hi Pawel,

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.

Thanks for your help
John

Hi John,

Thanks for letting me know. Great idea!

Regards,

Pawel