TeamCity + HG. Only pull (push?) passing builds
- by ColoradoMatt
Feels like with the popularity of continuous integration this one should be a piece of cake but I am stumped. I am setting up TeamCity with HG. I want to be able to push changesets up to a repository that TeamCity watches and runs builds on changes. That's easy.
Next, if a build passes, I want that changeset to be pulled into a "clean" repository... one that contains only passing changesets. Should be easy but...
TeamCity 6 supports multiple build steps and if any step fails, the rest don't run. My thought was to put a build step at the end that does a pull (or optionally a push?) to get the passing changeset into the clean repository.
I am trying to use PsExec to run hg on the box with the repositories.
If I try to run just a plain 'hg pull' it can't find the hg.exe even though it is set in the path and I have used the -w flag.
I have tried putting a .bat file in the clean repository that takes a revision parameter and it works fine... locally. When I try to run the .bat file remotely (using PsExec) it runs everything fine but it tries to run it on the build agent. Even if I set the -w argument it runs the .bat file there but tries to run the contents on the build agent box.
Am I just WAY off in my approach? Seems like this is a pretty obvious thing to do so either my Google skills are waning or no one thinks this is worthy of writing about. Either way, I am stuck in SVN land trying to get out so I would appreciate some help!