Thursday, 18 August 2016

SonarQube 6.0 and the StyleCop plugin

For one of our projects we use the StyleCop plugin for SonarQube during the analysis. As you can see it was recently deprecated.

I successfully updated the instance used by this product to SonarQube 6.0, when I was told an exception was raised while building:

image

To make things worse, there are no workarounds or quick fixes to unblock it as you can see from here. The reason behind this is because it isn’t using the .NET Compiler Platform.

Long story short – the plugin is deprecated and it won’t work with SonarQube 6.0. You can either disable the plugin and keep SonarQube 6.0 running or revert back to SonarQube 5.6.1.

Friday, 12 August 2016

SonarQube analysis of Java code with VSTS

As we know, we can use VSTS to build Java code as well as .NET code thanks to the Maven instance provided by the service. It is one of the reasons why we can forget about the build engine with VSTS – it just works.

If I use Maven on VSTS I don’t even need to add a SonarQube task in the Build Definition. All I need to do is to tick the checkbox and point Maven to my SonarQube instance:

image

This is literally all I have to do. Maven is already configured so I will get my SonarQube analysis in two clicks:

image

Wednesday, 10 August 2016

Package Management in TFS15 RC1

If there was a missing feature in TFS 2015, it was the lack of an integrated Package Management solution. Long are these days, the Package Management extension is bundled in TFS 15 RC1!

You just need to install it via your Local Extension Gallery and you are good to go:

imageimage

You can then create a new feed:

image

and you are going to get a very nice guidance page to get started:

image

These are the default permissions:

image

After that you’ll add the feed as usual in Visual Studio:

image

so you can start pushing something up there!

image

Delivery of stuff via NuGet package is more and more frequent these days and you had to rely on a third-party tool like ProGet (on-premises) or MyGet (in the cloud). It is great to have it integrated in Team Foundation Server, extending the ALM platform with out-of-the-box features.

Tuesday, 9 August 2016

Metatasks in TFS 15 RC1

It isn’t really about TFS 15 RC1 this time, but now the UI is totally out for it so it is very prominent Smile there is a very nice feature I usually see being overlooked when talking about the new build: meta-tasks.

Meta-tasks were added a couple of weeks ago to the service, and they are a very easy way of collating a set of tasks you keep repeating in your build definitions.

For example, let’s say you start a VM and then extract files to it all the times:

meta0

You can group this as a meta-task so you can reuse this set of tasks elsewhere:

meta1

meta2

Once a meta-task is created its configuration is retained, so you can just drop the meta-task in the definition and you are ready to go!

meta3

meta4

Meta-tasks can be managed in the same hub as Build and Release Definitions…

meta5

…and they come with their own set of ACLs, so you can restrict access to them if you want.

meta7

The very nice side effect is that once you start creating your meta-tasks and make them available to the team, you can start bringing a new Definition up to speed very quickly because you already have some building blocks to use instead of relying on heavy documentation and long configurations with variables and such.

Friday, 5 August 2016

Easy HTTPS with TFS 15 RC1

There are a number of changes in TFS 15 RC1, and one I really like is the HTTPS configuration.

When you configure the Application Tier you can now select the bindings you want:

https0

Clicking on the dropdown shows all the configurations – HTTP, HTTPS or both:

https1

with the possibility of selecting the certificate straight from the wizard!

clip_image002

You can also change the bindings, the virtual directory and the URL if needed:

image

It is just a convenience, true, but it is really handy to use instead of doing thisSmile

Thursday, 21 July 2016

Review – Professional Visual Studio 2015

WP_20160720_001 This is a book I keep reviewing at every release, and for good reason: it is not mainly aimed at seasoned users of Visual Studio but at beginners approaching this IDE for the first time.

This is why you won’t find many changes from 2013 to 2015 – because an IDE doesn’t change as much. But I still recommend it, because of its role as a one size fits all overview of the development stack we use these days.

It is still worth it if you need a reference on your shelve (like I do Smile), or because it also has good and quick code examples. Eventually I realised one of the biggest improvement is the size of the font from last version’s – it is more readable.

Tuesday, 12 July 2016

A first look at TFS 15: the new Build Agent

Another big change in TFS 15 Preview is the new Build Agent.

This doesn’t mean there is yet another build server (the new Team Build is here to stay Smile), the big news here is that the new Agent is cross-platform by default, because it is written in .NET Core!

You can set it up as usual from the main _admin page. Once you add the new Agent, you can select Windows (preview):

na0

You need to add a user as Agent Pool Administrator to run this new agent, as per documentation:

na1

Once you start it, you would be prompted for some configuration settings. It is very easy and similar to the old agent:

na2

All done!

Remember it is a preview, and if you want to start using it that this agent is a replacement for the Node.JS agent. So if you want to keep using TFS 2015 in the meantime do not replace the Windows Agent that comes with it.

As usual, the code for the agent is on GitHub.