Agent Choice

Is it possible to have a build Trigger on an agent with a specific set of software loaded?

E.g. Office 2003, 2007, 2010, 2012 might be installed in various combinations on a range of "VM agents".

  • I'll give you a scenario.
  • When you work with data files you can use a range of methods to read that data.
  • There are some very specific requirements to use Excel Automation rather than .net OLE drivers.
  • One of my core data API allows a developer to "choose" to use Excel automation.
  • I have unit tests that run those tests.
  • I want to be able to use Continua to see if unit tests are different with different editions of that software.

 

Is it possible to have a Configuration for which gets run in different environments but controlled by the software on an agent?

 

AKA Can I have logic in the Configuration like ExecuteOn = $Agent.Name$.

Triggers do not get to decide which agent the build runs on. You can however set an Agent Requirement on the stage, e.g :

$Agent.Hostname$ Equals mymachine

Agents are selected based on the requirements of the stage, and the capabilities of the agent. The requirements are collected from the Stage Agent Requrements and the Actions on the stage. Agent capabilities are reported by the Agent Properties. Agent Properties are defined by Property Collectors, or you can manually define them. You can also add your own Property Collectors and this would be the recommended way of doing this. So while you can hard code a stage to a specific agent, it would be better to define property collectors that will the have the agents report the capability/property, and set the requirement on the property. That way if you add other agents later that are able to run the stage they will get used as well.

So the idea is that Continua should never assign a Stage to an Agent not capable of running it.

I totally agree with your approach. I’ve added my own property collector for Excel 2010. Now where in the Continua UI do I use it? Having a “blond” moment.

In the workflow editor, double click on the Stage or click on the Edit Stage Options button, switch to the Agent Requirements tab. Add a an expression , eg :

$Agent.Office.2010.Excel.Path$ Exists

BTW, note how I namespaced the property that was created by my property collector, so as I type $Agent.O I get completion for the properties.

Oh guys your implementation on this is fantastic!

I can see the agents for each project -> configuration that are compatible.

Attachment unavailable

Thanks Jamie. Result of many hours at the whiteboard