Search This Blog

Showing posts with label build type. Show all posts
Showing posts with label build type. Show all posts

Tuesday, April 17, 2007

How to Get Build Result Details using TFS API - Part 3

The previous post in this series was about the build steps section of the build report. In this post we will see how to retrieve the associated changesets section details.

Using the BuildStore object we have created in this post we can get a list of ChangeSetData objects that contain the needed information (an example on how to get the buildUri parameter value available in this post also):

ChangeSetData[] changesets = buildStore.GetChangeSetsForBuild(buildUri);


foreach (ChangeSetData changeset in buildReport.Changesets)

{

MessageBox.Show(changeset.ChangeSetId.ToString());

MessageBox.Show(changeset.ChangeSetUri);

MessageBox.Show(changeset.CheckedInBy);

MessageBox.Show(changeset.Comment);

}


Tuesday, April 10, 2007

How to Get Build Result Details using TFS API - Part 2

The previous post in this series was about the summary section of the build report. In this post we will see how to retrieve the build steps section details.
Using the BuildStore object we have created in the previous post we can get a list of BuildStepData objects that contain the needed information (an example on how to get the buildUri parameter value available in the previous post also):

BuildStepData[] buildSteps = buildStore.GetBuildSteps(buildUri);

Now we can go through all the objects in the collection and retrieve details for each one of them.

foreach (BuildStepData in buildSteps)
{
MessageBox.Show(buildStep.BuildStepMessage);
MessageBox.Show(buildStep.BuildStepName);
MessageBox.Show(buildStep.FinishTime.ToString());
MessageBox.Show(buildStep.Status.ToString());
}

Wednesday, March 14, 2007

How to Get Build Result Details using TFS API - Part 1

In this series of posts I would explain how to use TFS API in order to retrieve build result details as they appear in the build report.


In order to retrieve result details for a build we need to create a BuildStore object. There is an example on how to create a BuildStore object on a previous post: Get Build Changes. The example take into consideration that you have already created the BuildStore object and it is named buildStore.

In this post we will see how to retrive the details under the summary section of the build report. First, we need to get the BuildData object for the build. Here's how to get the BuildData object:

BuildData buildData = buildStore.GetBuildDetails(buildStore.GetBuildUri(teamProject, buildNumber));

Now that we've got the BuildData object we can retrieve the build details that appear in the summary section of the report:

buildData.BuildNumber
buildData.RequestedBy
buildData.TeamProject
buildData.BuildType
buildData.BuildMachine
buildData.StartTime
buildData.FinishTime
buildData.LastChangedBy
buildData.LastChangedOn
buildData.BuildQuality
buildData.LogLocation

On the next post for this series I will explain how to retrieve the details for the "Build Steps" section of the report.

Sunday, February 25, 2007

Start a Team Build Using BuildProgressForm

I found out another way for starting a build using the BuildProgressForm. The BuildProgressForm is the same one used by Visual Studio Team Build intergration for starting a build.




This method is very useful for my tool TFSBuildManger.
Here's an example of how to do so:

BuildParameters buildParameters = new BuildParameters();
buildParameters.TeamFoundationServer = teamFoundationServer; buildParameters.TeamProject = teamProject;
buildParameters.BuildType = buildType;
buildParameters.BuildMachine = buildmachine;
buildParameters.BuildDirectory = buildDirectory;
BuildProgressForm frmBuildProgress = new BuildProgressForm(buildParameters, teamFoundationServer);
frmBuildProgress.ShowDialog();

Wednesday, February 21, 2007

TFSBuildManager UI Change (Tabbed View)

It been a while since my last post. Anyway, I have published a new release of TFSBuildManager under CodePlex. The main and only change for this release is that the UI now supports control of multiple build types simultaneously by using tabs. Hope you would like this change. You can download the new version here. I would appreciate your comments on this change and about the application.

Wednesday, January 31, 2007

TFSBuildManager New Version

I have released a new version of TFSBuildManager. You can download it here. I made some changes to the edit build type form and added some advanced properties that are inherited from the imported Microsoft.TeamFoundation.Build.targets file. There are some other cool features like "Execute Without Get" which actually resumes a build from the compilation point disabling the process of creating a workspace. This feature is very handy when you setup a new build machine and the build fails because of errors regarding the machine configuration and not because of source files. For the full feature list see the release change log.
Enjoy.

Wednesday, January 10, 2007

TFSBuildManager

I wrote a utility to manage build types called TFSBuildManager. You can download it's first release here. It is hosted under CodePlex.
Main features of this utility are:
  • Start, stop a build
  • Change build/s quality
  • Delete, backup build/s
  • Edit build type

I wrote it because I needed the ability to manage build types outside Visual Studio environment. Also, I needed some features that are not available through Visual Studio IDE.

I'm planning to add:

  • Advanced build log
  • Add new Build Type
  • Build list filtering
  • Edit advanced Build Type properties

Enjoy.