We currently have a workflow that looks something like this:
- We have a development, test, staging and production environment
- We have branches in source control that match these environments
- We merge into these branches via pull requests
- Pull request merges trigger builds in bamboo for that branch
- Successful builds of that branch trigger a Bamboo deploy of that branch into it's matching environment
What we are looking to do is just have one branch that builds, and have that build be promoted from one environment to the next from within Bamboo's deployment area. The problem we are facing is that we have .net web.config transforms that are executed at the build stage that have environment specific setup within them. If we are deploying to each environment based on a single build, how do we specify which configuration to use and when does that transform occur?
My initial thought is to generate each environment's transform file within the build and save them as artifacts to pass on to the deployment project, and then use them there to deploy to their respective environments. Does this approach seem valid? This seems like a common scenario, so I was just wondering how others may look to solve this problem.