Tuesday, November 29, 2016

VSTS - RM & PM in GA, Search for a file and Microsoft Teams

This month we had not one, not two but even three feature release of Visual Studio Team Services!

I had to choose between so many new features to have my top 3 list this month, so it means that they are the very best.

Package Management & Release Management General Availability

Package Management now hosts NuGet and npm packages and helps you manage the lifecycle of your packages with new features like release views. It continues to offer best-in-class support for the latest NuGet updates and great integration with Team Build.

Packages enable you to share code across your organization: you can compose a large product, develop multiple products based on a common shared framework, or create and share reusable components and libraries. Package Management facilitates code sharing by hosting your packages, sharing them with the people you select, and making them easily accessible to Team Build and Release Management.
The Package Management extension is available in the marketplace

Release Management is also available in GA in VSTS and TFS 2017. Using Release Management, you can fully automate the delivery of your software all the way to production. It is an essential element of DevOps that helps your team continuously deliver software to your customers at a faster pace and with lower risk.

To use Release Management, first create release definitions and then configure environments and specify automation steps in each environment to deploy the software and run tests against it. You can set up automatic deployment to the environments as soon as the build is available to deliver value continuously to your customers. You can also configure approvals on each environment.

Search for a file or folder in commit history

Similar to the files tab, users can now search for a file or folder in a repository and see the history of commits for that file or folder. For any Git repository, go to the path control box on the History tab and start typing to initiate a history search experience for the file or folder you are looking for.

Microsoft Teams integration

Microsoft Teams is a new chat-based workspace in Office365 that makes collaborating on software projects with Team Services a breeze. Team Services users can stay up to date with alerts for work items, pull requests, commits, and builds using the Connectors within Microsoft Teams. Starting November 9, users will also be able to bring their Kanban boards right into Microsoft Teams.

Monday, November 28, 2016

WorkItems History: My first extension for VSTS and TFS

I'm very excited and proud to share with you the first version of my very first Extension for Visual Studio Team Services and Team Foundation Server: WorkItems History.

WorkItems History is an extension that adds a "History" hub to the Work section of VSTS/TFS and allows you to see the history of the added/modified work items.

Working in a team is not always easy, especially when you need to have "things under control". With this extension, you can have a little more control of what is happening on your work.

Other info
I decided to release this extension as Open Source Software.
You can have a look at its GitHub page (https://github.com/n3wt0n/WorkItemsHistory) and, if you wish, you can contribute to the project. Please refer to Contribution guidelines and the Code of Conduct for more details.

Usage, support and Feedback
The extension is publicly available on the VS Marketplace, at this link: https://marketplace.visualstudio.com/items?itemName=DB.WorkItemsHistory

You can take a look at the GitHub repo to find more information on usage or installation of the extension.

If you encounter any issue using this extension, please let me know through the Issues page on GitHub and I'll fix the problem as soon as possible!

I'm waiting for your feedback :)

Thursday, November 17, 2016

Data and News from Connect(); 2016

On Wednesday, November 16, 2016, Microsoft demonstrated at Connect(); 2016 its vision of enabling the future of development with solutions that serve any developer, any application and any platform.

They have also shared some very interesting data about services and products adoption:
  • More than 20 million Visual Studio 2015 installs (with the free Community edition representing more than 14 million of those)
  • 1 million Visual Studio Code monthly active users (MAU).
  • 4.6 million registered Visual Studio Team Services users
  • More than 25,000 developers from 1,700 companies have contributed to .NET Core and related open source repositories, with nearly 2/3 of the contributions coming from outside Microsoft.
  • 1 million Visual Studio Dev Essentials members
  • Half-a-million more Xamarin users since the acquisition, a 3x increase over the company’s previous growth rate.
  • 20,000- registrations for the SQL Server on Linux private preview, including over 50% of the Fortune 500.
  • 1.6 million Azure SQL Databases in the cloud and over 100 billion queries per day
  • More than 120,000 new Azure subscriptions/month
  • Approximately 1 out of 3 VMs on Azure are Linux
  • 35% month over month growth of Microsoft Graph in past year.
  • 47,000 active third party applications built using Microsoft Graph and more than 1 billion API transactions on Microsoft Graph
  • More than 400M Windows 10 devices
  • The Windows 10 Cortana search box now has over 141 million monthly active users
Brian Harry has written a very good blog post (read it here) with all the announcements about TFS and VSTS. Take a look at it!

Monday, October 31, 2016

VSTS - Scheduled release, Azure and XCode build

One more month, one more exciting release of Visual Studio Team Services.
These are my top 3 new features of this month:

Multiple schedules in releases

Want to schedule your releases to be created more than one time in a day? You can now configure multiple scheduled triggers in a release definition.

Simplified Azure endpoint creation

In an earlier sprint, VSTS team made it easier to create a new Azure Resource Manager service endpoint from Team Services. That experience only worked in accounts that are backed by an Azure Active Directory. In this deployment, they are bringing the same simplified experience for all the other accounts that are not backed by an AAD. So, if you are a MSA user and have an Azure subscription that you would like to deploy to from Team Services, you can create an Azure endpoint without having to run tedious Powershell scripts or following a blog.

Xcode 8 signing and exporting packages in the Xcode Build Task

The Xcode build task now supports building your projects using Xcode 8 automatic signing. You can install the certificates and provisioning profiles on the build server manually, or have the task install them by specifying the File Contents options.

Xcode 8 requires specifying an export options plist when exporting an app package (IPA) from an archive (.xcarchive). The Xcode task now automatically identifies the export method if you are using Xcode 8 or Xcode 7. You can specify the export method or specify a custom plist file from the Xcode task. If you are using an Xcode version older than Xcode 7, the task falls back to using the old tool (xcrun) for creating the app package.

Friday, September 30, 2016

VSTS - Manual deploy, Git imports and Queues

Here we are for a new episode of my personal "top 3 new VSTS features" series. Let's talk about September.

Deployment manual intervention

You can now pause execution during deployment to an environment. Including a Manual Intervention task enables you to pause a deployment, perform manual steps, and then resume further automated steps. You can also reject the deployment and prevent further steps from executing after a manual intervention.

You should note that a manual intervention task splits the overall execution into three phases. 

  • The first phase runs on an agent, and after it is done, the agent is released. 
  • The manual intervention phase does not require any agent. 
  • After it is completed, any tasks following the manual intervention task are run in the third phase, possibly on a different agent. The artifacts are downloaded during both the agent phases, since different agents may be used for both of them. You should not assume that the state from the first phase is available during subsequent phases.

Import Git repositories

We can now import a Git repository from GitHub, BitBucket, GitLab, or other locations, into Visual Studio Team Services. You can import into either a new or an existing empty repository.

To import into a new repository, from the repository selector drop-down, click Import repository. 

If the source repository is a publicly available repository, then simply provide the clone URL of the source repository and you are good to go.
However, if the source repository is a private repository and can be accessed using basic authentication (username-password, personal access token, etc.), then check the “Requires authorization” check-box to provide the corresponding credentials.

Instead, to import into an existing empty repository, on the Files page, click the Import repository button and provide the clone URL. You will need to provide credentials if the source repository is private and requires authentication.

Build queue tab

They've implemented a new design for the Queued builds page that shows a longer list of queued and running builds, and in a more intuitive fashion. Looks good...

Monday, September 5, 2016

About Xamarin build (again)

Back in April, in one of my posts (read it here) I explained  that it was no more necessary to  include the "Xamarin License step" when building Xamarin solutions using the Hosted Agents.

Starting from now, it is no more necessary to include this step for every Xamarin builds, for both Hosted and personal agents.

Indeed, as reported on the new Visual Studio Team Service update: 

The Xamarin License step is no longer necessary and has been removed from the build templates shipped with VSTS and TFS 15. As part of this effort we will also deprecate the task. All build definitions that use this task should be updated to remove it in order to prevent any disruption when the task is finally removed.

Have good builds ;)

Friday, August 26, 2016

VSTS - Files, Details and Folders

In august there's been only one update to Visual Studio Team Services. Let's take a look at my 3 favourite new features for this month.

Pull requests Files

The biggest new feature in this release is the ability to see past updates made to a pull request. A few sprints ago (July 7th), they released the ability to properly track comments as a pull request is updated with changes. However, it’s not always easy to see what’s between updates. In the Files view, you can now see exactly what changed each time new code is pushed to your pull request. This is really useful if you’ve given feedback on some code and want to see exactly how it changed isolated from all of the other changes in the review.

Improved build details

When you click down to focus on a specific build, it now gives you a lot more information about what's happening and overall code quality. 

Build Definition folders

Does your team have a lot of build defintions? You can now use folders to keep them organized in the All Definitions tab.

Tip: Have a batch of definitions that need the same permissions? Put them in a folder and then you can give permissions to the folder

Tuesday, August 2, 2016

VSTS - Azure, Comments & Redeploy

Here we go with my 3 favourite new VSTS features for July.

Release management - Azure deployments

Now, setting up an Azure Service endpoint is easy: you just need to select the subscription on which to create a service endpoint, and you are ready to deploy to Azure.

  • Users can now automatically set up an ARM service connection by selecting the subscriptions linked with the Azure Active Directory that is backing the VSTS account.
    • Note: A new Azure Service Principal will be created and assigned the Contributor role, having access to all the resources in the selected subscription. You can modify the Service Principal access from Azure portal > Subscriptions > Users > Roles.
  • Prerequisites: -The VSTS account should be backed by an Azure Active Directory. For more info, see the Visual Studio article Team Services: Access with Azure Active Directory (Azure AD).
    • Note: Only Azure subscriptions that are linked with the Active Directory are listed.

Comment tracking for pull requests

Pull requests in VSTS have been improved to show comments left in files on the proper line, even if those files have been changed since the comments were added. Previously, comments were always shown on the line of the file where they were originally added, even if the file contents changed—in other words, a comment on line 10 would always be shown on line 10. With the latest improvements, the comments follow the code to show what the user expects—if a comment was added on line 10, and two new lines were subsequently added to the beginning of the file, the comment will be shown on line 12.
Here's an example change with a comment on line 13.

Even after the code has changed to shift the line with the original comment from 13 to 14, the comment is appearing in the expected place (line 14).

I think this improvement is a big step forward for improving the code commenting experience in pull requests. In the near future we will have even more improvements coming, including improved comment placement for renamed or moved files.

Release – redeploy after success

When a deployment to an environment fails, you may want to be able to redeploy an older release that already succeeded once in that environment. This feature lets you do just that. 

When you try to redeploy an older release, you will be shown the list of commits as well as the list of work items that will be rolled back. You just need to make sure that the automation scripts for deployment can really handle the rollback scenario. That is still on you.

Tuesday, June 21, 2016

VSTS - SSH, Docker and Tokens

Another month, another update for Visual Studio Team Services! (To be honest, there have been 2 updates in June :) )
This is my favourite 3 new features:

SSH clients can connect to Git repos

Team Services Git repos now support SSH connections. This makes it easy for many development tools, build systems, and other services to connect, especially if you develop on Mac or Linux. You can get the SSH clone URL for your repo from the Clone button on the web, and also manage SSH keys on your profile page.

SSH has been enabled on all existing accounts. For the next sprint, SSH won't be enabled on new accounts until a few hours after the account is created. That restriction will go away shortly.

Docker integration for build and release management

Take advantage of the VS Team Services cloud-based build capabilities to build your Docker images and upload them to the Docker Hub as part of your continuous integration flow. Then, deploy those images to a number of Docker hosts as part of Release Management. The Marketplace extension adds all the service endpoint types and tasks necessary for you to work with Docker from VS Team Services.

Release – Passing oauth tokens to scripts

You might often need to run custom PS scripts in Release Management, which invoke REST APIs to create work items or query for more information about a build. You can now check an option in the environment to make a Visual Studio team Services OAuth token available to such scripts.

Here is a simple example on how to get a build definition:
$url = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECTID/_apis/build/definitions/$($env:SYSTEM_DEFINITIONID)?api-version=2.0" Write-Host "URL: $url" $definition = Invoke-RestMethod -Uri $url -Headers @{ Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" } Write-Host "Definition = $($definition | ConvertTo-Json -Depth 1000)"

Wednesday, May 11, 2016

VSTS - New features for Build & Release

Microsoft has published a new feature set for Visual Studio Team Services which brings some very interesting new things to the tool.

Build and release summaries

There are two new bits of information that will show up on the build and release summaries. 
First, you’ll notice that console logs are now available in the Test pivot. Console logs are published as test result attachments and can be previewed in the Tests tab in the Build summary and Release summary panes.

Second, it’s very common to need to understand and identify test cases or containers that take the most time to run. You can now find this information by sorting the Duration column in the Tests tab in the Build/Release summary panes. In addition to the duration of individual tests, you can also look at aggregate duration of test containers or test runs by grouping by the respective pivots.

Release Management improvements

This release brings with it quite a few Release Management (RM) improvements. Let’s walk through the new capabilities…
First, Release Management now supports linking repositories (both Git and Team Foundation Version Control) as artifact sources directly to a release definition, enabling you to consume resources in your repos without having to publish build artifacts with the same files. Note: There is no support yet for auto-triggering new releases when a commit is made into these repositories, but that work is in flight, so stay tuned.

Additionally, you’ll find these new features:
  • Copy, Export, Import. A new extension has been published in the Marketplace that lets you copy, import, and export release definitions.
  • Schedule Based Deployment Condition. You can now configure a condition on an environment to pick up the successful deployments (or the latest one) from another environment and promote them at the selected time. This capability allows you to have time-based deployments that happen on a repeatable schedule. Chose the Deployment Condition tab in your environment to configure the schedule.
  • Release Management REST APIs. You can now use the REST APIs for Release Management service. They are published at: https://www.visualstudio.com/en-us/integrate/api/overview. Most of these APIs work with the on-premises releases of RM features in TFS 2015 Update 2 as well (changes between TFS and Team Services versions are indicated in the API docs). 
  • Simplified Release Definition Wizard. The wizard to create release definitions has been simplified. You can enter most of the inputs to setup a definition with a single environment in this wizard. They have also simplified the process for adding more environments into a definition or to clone an environment. 
  • New Job Execution Variables. Below are a set of variables now available that let you access information about artifact sources when executing deployment jobs. These variables are available in the format: RELEASEARTIFACTS_. represents the artifact source that is included in the release definition. You can find the name of the alias in the Artifacts tab of a release definition. 
    Note: For scripts, replace the underscore with a period.

Friday, April 29, 2016

About Xamarin build with VSTS Hosted Agents

Last friday (22/04/2016), during an event organized by DotNetToscana, I had a talk about the build of Xamarin apps with Visual Studio Team Services' Hosted Agetn 

To make the build works, I had to add two tasks to manage the Xamarin License to the build definitoin: one to activate the license and another one to deactivate it after the build operation. 

There is a small (and big at same time) news about these two tasks: they are no more required now
Indeed, with the most recend update of the VSTS platform, the Hosted Build Agents have already an internal Xamarin license which is automatically activated when they have to perform some build opreations against Xamarin projects. 

So, to sum up, if you have or want to create a Xamarin build definition (and use VSTS Hosted Agent) now you don't have to add the license activation and deactivation tasks anymore. 

Have a good build :)

Tuesday, April 5, 2016

Introducing BugGuardian.MVC and BugGuardian.WebForms

Today I'm very excited to announce that I have released two additional modules for BugGuardian.

For who doesn't know it, BugGuardian is a library that allows to easily create a Bug or a Task work item on your Visual Studio Team Services account or on your on-premises Team Foundation Server 2015 in the case your application throws an Unhandled Exception.

To better support the integration of this library with web projects, today I'm announcing the availability of BugGuardian.MVC and BugGuardian.WebForms.

BugGuardian.MVC (GitHub, NuGet) is an extension for BugGuardian specifically written to support Asp.net MVC applications. 
It adds an Action Filter to your application to let you automatically intercept all the exceptions.

BugGuardian.WebForms (GitHub, NuGet), instead, is an extension for BugGuardian specifically written to support Asp.net WebForms applications.

They are based on the new BugGuardian version 1.3.0 and they support projects written with the .Net Framework v4.0 and above.

As it is for BugGuardian, these two additional libraries are OSS so feel free to see their code on GitHub.

If you encounter any issue using these libraries, please let me know through the GitHub Issues pages and I'll fix the problem as soon as possible!

Again, I want to thanks my friend and fellow MVP Marco Minerva (@marcominerva, GitHub) for the support and the suggestions.