Contents tagged with TFS

  • Cruise Control Build Server

    Tags: TFS

    We have recently started using Cruise Control to manage our build processes, this works great with asp.net web deployment projects and TFS.

    Cruise control for those who dont know, is, according to the website "CruiseControl is a framework for a continuous build process. It includes, but is not limited to, plugins for email notification, Ant, and various source control tools. A web interface is provided to view the details of the current and previous builds"

    We run it on a separate box (soon to be a virtual box), it has a nice simple web interface to force builds if you so wish and a small windows app that shows the status of each project and notifies you of completed builds.

    <projectname="CC Project Name">
    
      <labellertype="dateLabeller" />
    
      <!?-BuildAuto.FiredDaily-->
      <triggers>
        <scheduleTriggertime="08:00"buildCondition="ForceBuild"name="StpStageScheduleBuild">
          <weekDays>
            <weekDay>Monday</weekDay>
            <weekDay>Tuesday</weekDay>
            <weekDay>Wednesday</weekDay>
            <weekDay>Thursday</weekDay>
            <weekDay>Friday</weekDay>
          </weekDays>
        </scheduleTrigger>
      </triggers>
    
      <sourcecontroltype="vsts"autoGetSource="true"applyLabel="false">
        &vstsConnection;
        <project>$/TFS Project/</project>
        <workingDirectory>D:\Projects\...</workingDirectory>
        <cleanCopy>True</cleanCopy>
        <force>True</force>
      </sourcecontrol>
    
      <tasks>
    
        <msbuild>
          &msBuildExe;
          <workingDirectory>D:\Projects\...</workingDirectory>
          <projectFile>SolutionName.sln</projectFile>
          <buildArgs>/p:Configuration=Debug</buildArgs>
          <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
          <timeout>600</timeout>
        </msbuild>
    
        <!-- Take a backup of the build so we can roll back-->
        <buildpublisher>
          <sourceDir>Build Drop</sourceDir>
          <publishDir>Backup Drop</publishDir>
          <useLabelSubDirectory>true</useLabelSubDirectory>
        </buildpublisher>
      </tasks>
    
      <externalLinks>
        <externalLinkname="Project Home"                  url="http://URL Shown on CC Project home page - I have link to TFS portal"></externalLink>
      </externalLinks>
    </project>

    Most of the work is done is an XML file, in here I create the project and tell it where the source control is (TFS server in our case) then what tasks I want to execute for the build. Calling msbuild is the key one here but there are other cool features like making a backup of the build, NUnit and any external app.

     What makes this really cool for asp.net applications is using the ASP.net web deployment project. I have setup the required config files in my application so the deployment project will make the necessary changes to the web.config for my connection string and app settings for the dev, stage and live environments and deploys the web app to the stage or live IIS server.

    Cruise control shows in its logs any and all changes to the project's source and any comments that have been made on check in, so its nice and easy to find a reason why the build failed.

    Another cool feature is CCTray, which is a windows app that talks to the build server, shows the status of all projects and shows notifications of complete builds.

    Now we have a complete history and backup of all builds!! Sweet! :)

    I'd be interested to know what "build environments" people use, please comment!

    Technorati Tags:

    more...

  • TFS: Notify of newer version of file in source safe.

    Tags: TFS

    In TFS if you check out a file it DOESNT check for a newer version of the file in source safe (as it did in Visual Source Safe (VSS)) it was a decision taken by MS to remove this feature to ensure that auto "getting latest" will not brake to the local build.  I think MS have received so many complaints about this that in TFS 2008 they are putting it back in.

    In the mean time I found this project on codeplex http://www.codeplex.com/TfsAddInCheckOut

    Quick install, give it the TFS server name then when you try to checkout a file you get a message box telling you there is a newer version on the server and asks whether you want to download it.

    Job Done!

    There is another one I found from the SLR Team blog on MSDN here,  but I haven't used it so I cant comment!

    more...

  • 1