3-Team Build Activities part 1

[tweetmeme source=”mradwan06” only_single=false http://www.URL.com]
Today I will start introduce some of the important activities in the Team build 2010 as the following picture

Activities Toolbox

Activities Toolbox

So this process has 3 main steps as the following

Build Process main task

Build Process main task

  • GetBuildDetail Activity

This activity will return the Build Detail object which hold all information needed about the build, you need to declare a variable of type IBuildDetail to hold the object when return

BuildDetail

BuildDetail

If we print the BuildDetail variable .ToString we will find the following information, remember you can retrieve any info you find in the ToString from the BuildDetail as needed

BuildDetail.ToString

BuildDetail.ToString

  • AgentScope Activity

This activity used to group all activities that need to run on the Build Agent

  • GetBuildAgent Activity

This activity must run on the Agent and inside AgentScope Activity, it will return the Build Agent object which hold all information needed about the Agent, you need to declare a variable of type IBuildAgent to hold the object when return

  • GetBuildDirectory Activity

This activity must run on the Agent and inside AgentScope Activity, it will return string of the path of the build directory

Notice that the variable Run on Agent in the picture because you must run them in the Agent

AgentScope and insiders

AgentScope and insiders

Notice that if we print the BuildAgent variable and BuildDirectory variable you will find all information needed for Agent and directory

Print buildAgent, print BuildDirectory

BuildAgent and BuildDirectory

BuildAgent and BuildDirectory

  • Assign Activity

This activity used to assign a string variable a value

  • AddToCollection Activity

This activity used to add item to collection you can use it with the ForEach Activity to add the item in a collection for each iteration

  • FindMatchingFiles

This Activity will find the files with specified pattern and return them as collection of IEnumrable<String>

  • InvokeForReason Activity

This Activity will invoke based on the build trigger remember this trigger is flag enumeration which mean you can choose more than one option for invoke

Other activities

Other activities

MatchFile Pattern

MatchFile Pattern

Finaly I will print out all the variables and I will use ForEach Activity to iterate over the collection that hold matches files to print all files

Print the variables

Print the variables

The value will be as the following:

The value of the print

The value of the print

Remember BuildSettings and AgentSetting which will display the option the process definition

BuildSettings AgentSettings

BuildSettings AgentSettings

Finished, wait me for Activities part 2

You can download the process from the following

Download

Download

Share This: