- Application neutral environment config
- Environment neutral application config
Pros
- With n apps and m environments you'd have to maintain n*m configs if you don't. Even with one application you're still going to have multiple environments which would justify this.
- Much easier to create new environments.
- Adding a new config variable for an application is easier to do across all environments.
- The environment config files could get bloated with unnessisary details - it's not that easy to tell which apps use a particular environment parameter.
It pays to expand the config / env combination rather than trying to do the expantion at runtime, as it keeps things simple and it's easy for support staff to see what's going on.
Java
In ant this could be done simply by using ant's filter task.
DotNet
There wasn't a msbuild task to do the filtering so I wrote one. It had one significant advantage over ant's filter task in that it would fail the build if one of the variables was not filled in for a particular environment.
No comments:
Post a Comment