Just wondering if anyone can give me some ideas on solving an issue we currently have with our Bamboo builds and subsequent deployments.
We have a single .Net website project that needs to be deployed in a couple of "flavours".
Each of these instances have a slightly different configuration.
At the moment, when we run a release build the project esssentially gets built three times, once for each instance, which generates three seperate artifacts. This process chews up quite a lot of build time, and vastly increase the space used for build/artifact storage.
Is it possible to have the build generate a single artifact, and then in a post-build task, or pre-deployment task, make the necessary configuration changes for each instance?
Welcome to the Community!
At a high level you have already described exactly what needs to be done. The question that I feel needs to be asked at this point is "what" is different configuration-wise between the three artifacts. I know for some of our older .net websites, we are storing configuration changes per environment in a separate repository and we are using powershell scripts to replace environment specific configuration settings in the app.config and web.config files ahead of deploying to the selected environment. Not sure if that suggestion will be helpful or not.
@Jimmy Seddon yes, I think it's just the configs that are being transformed as part of the build.
The thing I'm trying to solve is not building the same project over and over again.
Sorry, I'm not very clear on the build options available in Bamboo. Could we have seperate build that does the config transforms and outputs those as different artifacts? Then bring the main build artifact and the config build artifact together in a deployment plan?
Hey @Phil Carter,
Ok let me try to explain what we are doing a little more clearly. I want to preface this with what we are doing is not pretty but it works and we haven't found a better way ourselves. We only build the .Net website once with values for the development environment, and save that as our built artifact.
Then, we have a deployment project with QA, Staging and Production environments. When we execute one of those environments from our deployment project in Bamboo it does the following:
1. Downloads the artifact from the build plan (which contains dev values from our single build)
2. Checks out our configuration repository that contains all config values for all environments.
3. Run a PowerShell script that based on the environment we are executing does XML find & Replace to update the development values to what they should be set to for the environment we are executing.
4. Deploy the website to the correct servers.
So we are in fact only building it once. We aren't using proper web.config transforms to map the configurations at build time we are doing it using a Powershell script at deployment time.
I hope that makes more sense for you.
Hey there, Data Center community! I'm Martyna Wojtas and I am the Product Manager for Bamboo Data Center. I’m excited to share that Bamboo 9.0 is now available. We purpose-built this platform to help...