How do I propagate intermediate files between builds?

Quick summary:
* Windows platform
* TeamCity 8.1 (just installed, 2 days into learning it)
* Perforce
* Visual Studio 2013 solution (C++ & .NET, very, very large)

The solution & project files are generated by code.  I was hoping to have a build that generates these files and propagates them to subsequent builds to distribute to other build clients.

What I set up was the following:
* Top level project
* VCS Root as part of the project
* Build configuration to generate the projects and solutions
* Build configuration to build the code which has a snapshot dependency on the project generation step (so the chained builds do show up correctly).  This build is configured to trigger on P4 submissions.

When running unfortunately the generation of the projects and solutions don't appear to propagate to the subsequent build config.  Is there a step I'm missing?  Am I approaching this the wrong way?  Note that the code is from a 3rd party so I cannot trivially change it to behave differently.

Suggestions would be greatly appreciated!

2 comments
Comment actions Permalink

Is there any reason to not have the solution and project generation be the first step in the Build Config that is triggered by P4? This is the process that I always took on any other project where the solution files were generated and not committed to the repo. I would have swabra clean up any generated files from the previous, run the project generation tool via a command line step and then build the solution via the Visual Studio runner.

The method you're following currently can work, but you'll need to have the projects and solutions output as artifacts of their Build Config and the P4 triggered Build Config will need to have dependencies setup on those artifacts. It seems to me like it might be a bit over complicated, but it may make sense given the architecture of your project.

0
Comment actions Permalink

Just to clarify are you suggesting something along the line of:

Build Project
     Build Configuration 1
          Step: Generate Projects -> Step: Build Config 1 -> Step: Tests for Config 1 -\
     Build Configuration 2                                                                   Build Configuration 4
          Step: Generate Projects -> Step: Build Config 2 -> Step: Tests for Config 2  --       Step: Trigger Build & Label
     Build Configuration 3
          Step: Generate Projects -> Step: Build Config 3 -> Step: Tests for Config 3 -/


This will trigger the build with the same change list number from Perforce and label sources reliably?  Would I still use the snapshot dependency?  Or just make dependencies explicit?

I'm not sure I can trivially make the results of generation artifacts as bits are scattered throughout the repository.

I do have an additional question as well with this breakout.  The 3rd party app expects the changes to be checked back in to perforce.  I would like to have the label step above in the trigger to include these build assets.  So if I build the code based on rev 123456 and the binaries for steps 1, 2, and 3 are submitted as 123460, 123520, and 123462 respectively then I'd like all of these under the same perforce label.  Is there a way to do this with the existing functionality or am I looking at some custom scripting to support this?

Thank you!

0

Please sign in to leave a comment.