Know exactly what you’re about to deploy with Git, TeamCity and Octopus Deploy

Know exactly what you’re about to deploy with Git, TeamCity and Octopus Deploy

In my last post I showed how we can use Git, TeamCity and Octopus Deploy to include the commit id in an Octopus Deploy release, and therefore find out exactly what code is running in your system. In this post I want to show you can use the commit ids to do a diff between what you've already got...

Continue reading →

More concise, more readable. C# 6.0 real world gains

More concise, more readable. C# 6.0 real world gains

With Visual Studio 2015 comes C# 6.0. The team at Microsoft put a whole lot of effort into the Roslyn compiler this time around and the language features are primarily syntactic sugar, but they are still extremely welcome. The Null-Conditional Operator Here is a small piece of code that I inherited recently.  It has a very simple task, get the client's...

Continue reading →

Know exactly what you’ve deployed with Git, TeamCity and Octopus

Know exactly what you’ve deployed with Git, TeamCity and Octopus

Having a fully automated build and release process is, in my opinion, one of the best things you can do as a development team. We've spent the last 2 years moving to a fully automated build and release process and it has had an enormous impact on the way we develop and, more importantly, release software. Releasing has gone...

Continue reading →

How to export a lot of data from on-prem SQL Server to Azure SQL for testing

How to export a lot of data from on-prem SQL Server to Azure SQL for testing

Lately we have created several data marts in Azure SQL that will be fed from a data warehouse hosted on premises. The data mart is first created and tested locally so that we can get the structure and required stored procs correct. Whilst we are doing this it is easy to quickly transfer representative data to test the efficiency. Every...

Continue reading →

Re-usable, informative validation error messages in Angular

Re-usable, informative validation error messages in Angular

A while ago (at NDC London) I attented a two day course on Angular by the great K. Scott Allen, who spoke about using the ngMessages directive to provide re-usable validation on forms. While ngMessages is good, there is no way of providing detail on validation failures. For example, if a text input has to be at least 5...

Continue reading →

SQL DATETIME with slashes or hyphens returning incorrect data

SQL DATETIME with slashes or hyphens returning incorrect data

I’ve just spent a fun hour wondering why two seemingly identical queries were returning different data. It turned out to be an issue with DATETIME in SQL Server. SQL interprets a DATETIME of the format “yyyymmdd” differently to “yyyy/mm/dd” or “yyyy-mm-dd”. The former is "unseperated" while the latter is "seperated", and the "seperated" format depends on the current language and...

Continue reading →

Adding tables of static data to an SSDT project

Adding tables of static data to an SSDT project

Quite often when creating a database you will need tables of static data.  These range from simple lookups to date dimensions in a data warehouse.  You can easily create these in an SSDT project.Presuming you have already designed your tables and they are present in your project;Create a folder in your project called StaticData then add a sql script...

Continue reading →

Adding database references to a sql server project

Adding database references to a sql server project

If you are creating a sql server project with SSDT (see here) and your sql refers to another database you will need to add a database reference to allow the project to build. You can do this by right clicking your references folder and selecting 'Add Database Reference' If the database you are referring to is also a part of the...

Continue reading →

Visual Studio SSDT and TeamCity – Using Publishing Profiles and TeamCity integration

Visual Studio SSDT and TeamCity – Using Publishing Profiles and TeamCity integration

Database DevOps - SSDT and TeamCityUsing Visual Studio and SSDT you can immediately publish a fresh database or update an existing one by simply right clicking the database project and choosing 'Publish'. This will bring up a dialog that lets you edit the connection string to your database and set various options related to the publish.At this point you have a choice...

Continue reading →

Creating a Visual Studio SQL Project from an existing database

Creating a Visual Studio SQL Project from an existing database

There are all sorts of reasons why this is a good idea.  Not least because you can version control, unit test and tie into your CI system any existing database. How many times have you found inconsistencies between a test and live database, not known which one is right and been unsure who to ask on your team?  In my...

Continue reading →

Visual Studio SSDT and TeamCity – What you need to do.

Visual Studio SSDT and TeamCity – What you need to do.

I have just spent the last few days trying to get a SQL Project to build, deploy, run unit tests and create a dacpac on our build server which uses TeamCity. It wasn't a simple process and I had to accept a few conditions that I wasn't overly keen on but the upshot is that it works now and...

Continue reading →

TeamCity and MSBuild / MSTest

TeamCity and MSBuild / MSTest

TeamCity comes with MSBuild so that you can build your solutions directly by selecting a runner type of MSBuild in the Build Step.  You can also choose the version of Visual Studio your developers use and since TeamCity 8.1, Build Tools for 2013 are supported too. However if you need to run MSTest for your unit tests TeamCity recommends you install the...

Continue reading →