Friday, September 10, 2010

White Polyps In Brain, What Does It Mean?

TFS 2010 - Adapted process activity Part3

Now it is time to expand our build process to their own activities. Here is a very small activity to write messages in the build-process-output window.

First we need a new workflow library project.

image

We then create a new Activity code within the workflow project.

  1: using    System.Activities; 
  2:   using  Microsoft.TeamFoundation.Build.Client; 
  3:   using  Microsoft.TeamFoundation.Build.Workflow . Activities;  
      4:     
      5:     namespace   DeployActivities 
      6:   { 
      7:     
      8:       [BuildActivity(HostEnvironmentOption.All)] 
      9:       [BuildExtension(HostEnvironmentOption.All)] 
     10:         public     sealed     class   ExecuteSql : CodeActivity 
     11:       { 
     12:           [RequiredArgument]  
     13:             public   InArgument<IBuildDetail> BuildDetail { get; set; } 
     14:           [RequiredArgument] 
     15:             public   InArgument<  string  > Message { get; set; } 
     16:     
     17:             protected     override     void   Execute(CodeActivityContext context) 
     18:           { 
     19:        var message = context.GetValue (  this message.) 
  20:  context.TrackBuildMessage (message); 
  21:}  
  22:}  
  23: } 

The main elements are highlighted in yellow below.


image



For the steps that they reference the following assemblies:



  • C: \\ Program Files (x86) \\ Microsoft Visual Studio 10.0 \\ Common7 \\ IDE \\ Reference Assemblies \\ v2.0 \\ Microsoft.TeamFoundation.Build.Client.dll
  • C: \\ Program Files (x86) \\ Microsoft Visual Studio 10.0 \\ Common7 \\ IDE \\ Private Assemblies \\ Microsoft.TeamFoundation.Build.Workflow.dll
  • C: \\ Program Files (x86) \\ Microsoft Visual Studio 10.0 \\ Common7 \\ IDE \\ Reference Assemblies \\ v2.0 \\ Microsoft.TeamFoundation.Client.dll
  • C: \\ Program Files (x86) \\ Microsoft Visual Studio 10.0 \\ Common7 \\ IDE \\ Reference Assemblies \\ v2.0 \\ Microsoft.TeamFoundation.VersionControl.Client.dll

created a build of the project now our assembly with our custom activity.


To use our new activity now, we have used the build process is now in the template you just created Workflow project and invite ausschecken. The Assembly should have just created in order to be available later in workflow process, also copied to the Check-Out directory and later in the build process templates folder of the TFS source control system are checked.


image


Since the generated assembly is not in the GAC of the build server and agents is an added reference to the assemblies is necessary. The path to build the custom workflow assemblies is further adjusted in the build controller. The assemblies in the GAC or have checked into the source control system are located.


image


image


After the build process template used in the Workflow Designer opens, I get my activity by Drag'n drop in the workflow process.


image






Since also the built assembly in the GAC not the build server and build Agents is, is a (sadly) reference manual in the workflow XAML file necessary.


xmlns: local = "clr-namespace: DeployActivities; assembly = \u0026lt; AssemblyName >


Now is a workflow execution over the Team Build Explorer in the way of.


The log of the build we find the following additional output.


image

I-catcher Console - Web Monitor Simple

TFS 2010 - Build Process Part 2

The build process is divided into two stages. Build the controller initializes the build process and selects an available build agents. The build controller persists the workflow and passes control and the further processing of the workflow to the build agent.

image

The TFS 2010 Build-process workflow is when creating a new build definition with numerous Parameters to be adjusted.

image

be in a custom build process workflow The settings on the workflow metadata argument easily extend the workflow designer.

image

With this tool makes it possible to pass all necessary parameters to the workflow and thus to make this very flexible.

Thursday, September 9, 2010

Template Holographic Will

TFS 2010 - Part1 adjust production processes

were with the TFS 2010 many changes in the published functionality of the build management and customization shuffle mode.

The process uses a workflow-based Workflow Foundation 4.0 Engine to run builds. The build process is thus graphically customizable. There are 3 standard build process templates provided. DefaultTemplate.xaml for the normal build process. UpgradeTemplate.xaml to build process definitions created with Visual Studio 2005 or 2008. LabDefaultTemplate.xaml for builds that use the lab management.

image The standard build process is quite simple and essentially involves four steps.

  • Get the Build - Build Agent build environment - build environment
  • Update Drop Location - build output directory
  • Run on Agent Sources mark, start compile, automated tests and tasks to create
  • Check In Gated Changes - If gated check-in, then check-in in the source code repository

customize the build process

To adjust the flow of process steps in the existing workflow, there are several possibilities.

  • Drag'n drop existing standard activities from the toolbox .
  • create their own activities by using own WF 4.0 Activities Library in XAML spelling.
  • create their own activities through the use of its own activities WF 4.0 Library source code spelling.

In the following I would first like to address the adaptation of the "default templates".

First we open the Team Explorer Build the build definition, or create a new build definition. Then we look at the current set of process build definition file.

image

About New we can build a new definition file consists of creating a template.

image

This will of course put back in the source directory with the file name.

Now We can double-click the newly created build-process workflow template as desired even with the standard workflow activities change the TFS 2010 library.

image

save and build process by using the context menu start.

Finish.

In the next section, I demonstrate how to create and embed a custom workflow activity in the build-workflow.