Aggregating built artifacts in Teamcity to a single zip
Aim: Set up an ant/cmd script that will package the artifacts from several builds into a single zip. I plan to do this by setting up a final build configuration that will have a dependency on those several projects.
So all my build configurations build successfully and produce build artifacts on the Build Server @.BuildServer\system\artifacts{PROJECT}{several configurations}.. In my "Artifact Aggregating" configuration, I need to be able to reference what and where those artifacts are using variables that can be used in my ant/cmd script. i.e. I have Project A with configurations w, x, and y; how would I define/construct I variables of these configurations(w,x,y) that can be referenced by build configuration z. I looked at current Teamcity documentation i.e. http://www.jetbrains.net/conf开发者_运维问答luence/display/TCD3/System+Properties+of+a+Build+Configuration#SystemPropertiesofaBuildConfiguration-ref; but I find this doesn't resolve my query.
Is there a way I can set up my artifact paths for configurations w, x and y to make the final task easier?
What would be the best way to accomplish this task? Any ideas are welcome.
This is how we do that.
- Create n+1 Configuration(ZIP_ALL) and add dependency for all n projects see Dependency trigger
- Create network share \\server\Build for aggregating project's building results
- (you need cleanup strategy for that folder) - we simply drop all, our teammates create sub folders with SVN rev name (TC sets variable with revision value)
- For each configuration create msbuild(or ant, or rake) script, that will build and zip (if you need) all output from build
- Copy zip file or complete Output folder to common location (\\server\Build) see Copy Task
- Create ant script for ZIP_ALL configuration that simply zips all files in common location
- Publish that to TeamCity via Artifact Publishing
精彩评论