Month: September 2016

Some news for TFS

Posted on Updated on


Below some news about TFS Cloud version, you have new option of navigating on your dashboard, you reduce number of your clicks by 3, you have also new basic task in your release management, you can add manual intervention on server with instruction, you have new option when you download an extension, you must pay in order take first download or update of extesion ..

You have also new functionnality such as task group, permit to encapsulate set of activities into one meta task, in order to don’t be redondant.

mt1
In the first right click on set of tasks, select create group task,

mt2

we define the name of your meta task and the category when you like to view your task. for ours wh chosen Build.

mt3

In the sreen shot your can view the render of our task group, MetaTaskSample

mt4

We introduced also .netCore compilation task.

nc1

 

Create and integrate custom POWER BI reports for TFS

Posted on Updated on


For the generation of project monitoring reports conducted with the TFS platform, you can either use the basic building block SSRS, or use the new generation platform of Microsoft POWER BI reports.

You have a set of basic reports, those offered by SSRS but also many others.

publishing reports on the version of VSTS is a is housed by AZUR site.

The URL is accessible from the portal TFS …

GC.Collect

Get Release Management Datas With API REST TFS

Posted on Updated on


Microsoft has released a documentation of the VSTS and TFS integrating REST APIs. In the recent past we were using the client object model and API to interact with TFS. But it was very difficult for client which don’t have .Net Framework installed, and after installation of this later, you must to have Visual Studio, install dependencies on TFS assemblies, know C# …..
Now you can interact with VSTS and TFS via POWERSHELL scripts, or another language, with simple instructions.
It implies also an openness to other technologies and also ease of use.
You specify different HTTP verbs (such as GET, PUT, POST and PATCH) and the connection point to a specific URI (Uniform Resource Identifier) to interact with the API.
In our post we will define the URI of our TFS server, our project collection and also that of the team project.

$UriCollectionProject =  $TFSInstanceURL+"/"+$ProjectCollection+"/_apis/projects?api-version=2.2-preview.1"
$CollectionResponse = Invoke-RestMethod -Method Get -Credential $credential -ContentType application/json -Uri $UriCollectionProject  

When pointing to TFS, you can pass a username and password (masked as a secret variable) through
So we must to add theses lines below

$User = "Aghilas.yakoub"
$Password = "MyPassword" 
$securePassword = $Password | ConvertTo-SecureString -AsPlainText -Force  
$credential = New-Object System.Management.Automation.PSCredential($User, $securePassword)  

Us in this post we will try to list Releases runned by a specific person.
So secondly we will try to retrieve the list of team projects in a collection.
Emeber that a collection contains a set of project and a project contains a set of releases.
Below calling a GET on the URL of the collection.

$UriCollection =  $TFSURL+"/"+$ProjectCollectionName+"/_apis/projects?api-version=2.2-preview.1"
$CollectionResponse = Invoke-RestMethod -Method Get -Credential $credential -ContentType application/json -Uri $UriCollection

$CollectionResponse contains set of team projects.

foreach ($project in $CollectionResponse.value)
{
    $TeamProject= $project.Name 
	….
}

Now in a second time we will try to retrieve the list of release on a team project.
We will use the following suffix: /_apis/release/releases?api-version=2.2-preview.1

Ref : https://www.visualstudio.com/en-us/docs/integrate/api/rm/releases#get-a-release

#Construct URI for query team prpject and his releases
$Uri = $TFSURL +"/"+$ ProjectCollectionName +"/"+$TeamProject+"/_apis/release/releases?api-version=2.2-preview.1"

#Get response of previous uri
$releaseresponse = Invoke-RestMethod -Method Get -Credential $credential -ContentType application/json -Uri $Uri 

Now we must just get created releases by Aghilas


    foreach ($releaseInstance in $releaseresponse.value)
    { 
	If($releaseInstance.createdBy –eq “Aghilas”)
	{
             ......
        } 
    }

GC.Collect