Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make the web.config dynamic

We have an application and it is deployed across different pipeline dedicated for various release.

For ex - pipeline A - dedicated for march release pipeline B - for June release etc

Within each pipeline we various environment like DEV, SIT etc

Now , with release , while deploying code , we need to make changes in the webcofig file , because the urls that we have in config are pipeline and environment dependent.

For Example we have a web server - box 1 for dev environment . we have Pipeline A , Pipeline B deployed as websites. The web.config of pipeline A will look like -

<configMap hostnameList="box1" name="DevEnvironment">
      <include set="Dev" />
</configMap>
<configSet name="Dev">
<add key="someUrl" value="http://somapp-piplelineA-Dev.app.com"/>
</configSet>

The web.config of pipeline B will look like -

<configMap hostnameList="box1" name="DevEnvironment">
      <include set="Dev" />
</configMap>
<configSet name="Dev">
<add key="someUrl" value="http://somapp-piplelineB-Dev.app.com"/>
</configSet>

If you see this config , in the value for key someurl , the pipelineA was changed to pipelineB. These changes are tiresome when there are a lot of keys. So, we want to create a single web.config that can be used by all environment and which would not require any change.

like image 228
RowLand Avatar asked Jul 29 '26 20:07

RowLand


1 Answers

With Octopus Deploy you can deploy your web applications semi- or fully-automatically. But also it can perform Web.config Transformation for each environment separately.

like image 174
abatishchev Avatar answered Aug 01 '26 11:08

abatishchev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!