VCS Trigger to run on *ALL* agents

Hi there,

I have a TeamCity job that will install the correct version of a given SDK. It knows what version is the correct version from a text file that is checked into source control. The TeamCity job monitors this source control, and therefore when the text file is changed to a new SDK version, TeamCity will notice this change and assign an agent to run the job. That agent will then be brought up to the correct version of the SDK. The only problem is I actually want *ALL* agents to use the latest SDK, so I wondered what the feasibility would be of having a VCS trigger that is set to run on all agents.

I know there are some alternative systems for deploying software updates, but I quite like doing it through TeamCity.

Many thanks,

Steve

7 comments

I should mention; currently I use the [...] button next to the run button to get the job to run on all agents, so I do have an easy way of forcing the updates onto agents, it's just not being powered by a VCS trigger at the moment.

Steve

0

We have TeamCity setup to install our product on all build agents each night. There are 2 build configurations the first is triggered on a schedule, but this could easily by a VCS trigger, the build runs an Ant script that causes TeamCity to queue a second build configuration for all agents. You can see an example on the following page http://confluence.jetbrains.net/display/TCD5/Accessing+Server+by+HTTP in the section 'Triggering a Build From Script'. The last one should do what you need.

Rod

0

I have a similar problem in that I want to automatically run a Windows Update check on all agents overnight (but only when they are idle).

As you say, you can do it manually with the Custom Build UI. But not with the Schedule Trigger.

I was thinking that one solution might be to create a Custom Trigger Plugin that queues the build for ALL compatible Agents. There may be a more elegant solution that doesn't involve writing code, which I am unaware of.

0

I think my *ideal* end solution would be to have a TeamCity job, which has a sort of 'unit' test for each build agent, the unit testing consisting of installing the new SDK on each machine. That way you'd be able to see the results of the test, to find out if all agents successfully installed or not (and if any failed, then the whole job would fail).

But it sounds like aside from the perfect solution, I can at least do what has been suggested of having one job trigger another job, not perfect but pretty good, keeps things pretty automated.

Steve

0

Mark

You should be able to use the earlier suggestion of using 2 build configurations, one to queue a job for all compatible agents and the second to do the task. We've a number of Windows build agents that we schedule a job to clean up the temp directories, defrag the disk and reboot the machine each week, this was based on the tips shown here http://teamcitydev.blogspot.com/2008/10/agents-maintenance.html. You should be able to run a Windows Update check using this method.

Rod

0

Hi Rod,

Yes, we've gone down the http trigger route for now as it was faster to set up. Thanks for the link too, good to know how others do their TeamCity Agent maintenance.

Cheers,

Mark

0

BTW, you can vote for the feature to be a first class citizen: TW-4940 (which it deserves).

0

Please sign in to leave a comment.