Team Foundation Build Recipes

Control Lava Lamps and Street Lights In Your TFS Build

Modified: 2008/05/08 10:26 by admin - Categorized as: MSBuild Recipes, Team Build Recipes
Edit

Description

Build Street Light

Build Street Light


Have the ultimate notification of your TFS Builds. Control Lava Lamps, Street Lights, or any other lamp device to show if the build has succeeded, failed, or is currently building. The DeviceController task has been added to the Team Deploy tasks project. This task calls the x10 Firecracker kit.

Edit

Usage

Purchase the x10 Firecracker kit Download the Team Deploy tasks from www.CodePlex.com/TeamDeploy In addition to installing the tasks on your build server. You will need to install the x10Communicator execute a machine that is close enough to your lights. Usually the build server in the server is too far to use the wireless devices. The x10 firecracker transmitter will need to go on this machine.

Add the script below to your TFSBuild.proj to turn the light on for
  • Successful builds override the AfterEndToEndIteration
  • Failed builds override the AfterOnBuildBreak
  • Start of build override the BeforeEndToEndIteration

Edit

Source

Team Deploy CodePlex Project
Mike Douglas' blog - Code Smart Not Hard

Edit

Script

 

<Target Name="BeforeEndToEndIteration">
    <CallTarget Condition="'$(IsDesktopBuild)'!='true'" Targets="SetDeviceControllerYellow" />
  </Target>

  <Target Name="AfterOnBuildBreak">
    <CallTarget Condition="'$(IsDesktopBuild)'!='true'" Targets="SetDeviceControllerRed" />   
  </Target>
  
  <Target Name="AfterEndToEndIteration">
    <CallTarget Condition="'$(IsDesktopBuild)'!='true'" Targets="SetDeviceControllerGreen" />
  </Target>

  <Target Name="SetDeviceControllerYellow">
    <DeviceController
      DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
      RemoteExecutePathFilename="c:\pstools\psexec.exe"
      HouseCode="A"
      DeviceCode="1"
      StartTime="7:00"
      EndTime="17:00"
      Command="0"
      TargetMachine="Omanew263"
      />
    <DeviceController
    DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
    RemoteExecutePathFilename="c:\pstools\psexec.exe"
    HouseCode="A"
    DeviceCode="3"
    StartTime="7:00"
    EndTime="17:00"
    Command="0"
    TargetMachine="Omanew263"
        />
    <DeviceController
DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
RemoteExecutePathFilename="c:\pstools\psexec.exe"
HouseCode="A"
DeviceCode="2"
StartTime="7:00"
EndTime="17:00"
Command="1"
TargetMachine="Omanew263"
        />
  </Target>
  
  
  
  
  <Target Name="SetDeviceControllerGreen">
      <DeviceController
    DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
    RemoteExecutePathFilename="c:\pstools\psexec.exe"
    HouseCode="A"
    DeviceCode="2"
    StartTime="7:00"
    EndTime="17:00"
    Command="0"
    TargetMachine="Omanew263"
        />
    <DeviceController
    DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
    RemoteExecutePathFilename="c:\pstools\psexec.exe"
    HouseCode="A"
    DeviceCode="3"
    StartTime="7:00"
    EndTime="17:00"
    Command="0"
    TargetMachine="Omanew263"
        />
    <DeviceController
      DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
      RemoteExecutePathFilename="c:\pstools\psexec.exe"
      HouseCode="A"
      DeviceCode="1"
      StartTime="7:00"
      EndTime="17:00"
      Command="1"
      TargetMachine="Omanew263"
      />    
  </Target>
  <Target Name="SetDeviceControllerRed">
    <DeviceController
      DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
      RemoteExecutePathFilename="c:\program files\pstools\psexec.exe"
      HouseCode="A"
      DeviceCode="1"
      StartTime="7:00"
      EndTime="17:00"
      Command="0"
      TargetMachine="Omanew263"
      />
    <DeviceController
  DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
  RemoteExecutePathFilename="c:\pstools\psexec.exe"
  HouseCode="A"
  DeviceCode="2"
  StartTime="7:00"
  EndTime="17:00"
  Command="0"
  TargetMachine="Omanew263"
        />
    <DeviceController
DeviceControllerAppPathFileName="c:\x10communicator\x10communicator.exe"
RemoteExecutePathFilename="c:\pstools\psexec.exe"
HouseCode="A"
DeviceCode="3"
StartTime="7:00"
EndTime="17:00"
Command="1"
TargetMachine="Omanew263"
        />
  </Target>


Edit

Notes

  • Team Deploy requires a separate download of PsTools for the DeviceController task (and other tasks)

© 2008 William Bartholomew blog.bartholomew.id.au

Powered by screwturn wiki