Bird Stream

Entrepreneurship, development and (sometimes) cycling, often simultaneously, mainly in Nottingham

The Trick to Getting CruiseControl.net Build Label Into PowerShell Script

is to use an environment variable.

The PowerShell Task is a subclassed Executable Task which loads a series of environment variables before the task is executed. You then just need to access those in your PowerShell script via the $Env variable.

In my case
$label = $Env:CCNetLabel

Scroll down to the Notes section of this page http://confluence.public.thoughtworks.org/display/CCNET/Executable%2BTask for a full list of the environment variables that are set.

Comments