delv-hcm / VstsDockerBuild

Example of how to build docker images and run unit- and integrationtests using VSTS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building Docker images using Visual Studio Team Services

and running unit- and integrationtests using docker-compose

The solution

The solution consist of multiple projects

  • A WebApp project
  • A Shared library project
  • A "Service" project
  • A project with a few empty unit tests
  • And a project with a few integration test

The repository contains

I wanted to explore how to setup a complete build pipeline in VSTS for building multi image solutions. The examples I have been able to find were all very simple, as "getting" started guides tend to be. This is ok, but I wanted to take it just a little bit further.

So here I have set up a more complete sample solution that

  1. Builds multiple projects into docker images.
  2. Runs a number of empty unit tests
  3. Runs a few integration tests

These blog posts talks about the different parts of the sample

Post 1: https://medium.com/@christiansparre/building-a-multi-docker-image-solution-using-visual-studio-team-services-and-docker-compose-42fa196b6cd2

Post 2: https://medium.com/@christiansparre/running-your-unit-tests-with-visual-studio-team-services-and-docker-compose-3f82c9b95bf

I think the most interesting thing and one of the huge value propositions for docker, besides the general awesomeness, is how easy it actually is to setup integration tests of a complete solution. It does not involve deployment, it can easily run as part of your build pipeline and it can include everything from your own application to database servers etc.

Take a look

About

Example of how to build docker images and run unit- and integrationtests using VSTS

License:MIT License


Languages

Language:HTML 55.2%Language:C# 35.4%Language:Dockerfile 6.2%Language:CSS 3.1%Language:JavaScript 0.2%