Publish Multiple Projects from a single solution from TeamCity
I have a VS2008 solution with multiple projects in it. I need to publish five of these projects and two of those five needs to be published twice, with two different configuration settings (a simple change to the configSource of a few web.config attributes is all I need to do).
I would like to then take the resulting 7 outputs and put 4 into one zip file and the other 3 into an开发者_StackOverflow社区other and push them to a clients FTP ready for deployment.
Am I trying to do too much in one build configuration or is this reasonably possible?
I think that can be done in 2 configurations. I use the solution runner that builds all projects in the solution, then in the artifacts path section, each line would have something like:
foo\bar\bin\RELEASE\** => outputFooBar.zip
fizz\buzz\bin\RELEASE\** => outputFizzBuzz.zip
Then use the copy function to copy a configuration. I'm pretty sure you can't associate 2 runners with one build configuration.
Depending on which version of TeamCity you are using, you can either do all of these steps in multiple configurations (TC v5 or earlier) or multiple steps within a configuration (TC v6 or later). I generally favor splitting the building steps from the deployment steps. So I would have a single configuration for compiling, testing, etc of the project(s) and publish everything as artifacts. Then have different configurations (for different deployment environment, for example) to deploy, each may share similar steps and scripts.
The benefit is you get more control over queue priority, agent loads, etc. But the trade off is that the end-to-end build process may take longer and have more moving parts.
精彩评论