28
Progressive.Net 2016 @scottcowan 21 st June 2016 Build and Deployments

Build and deployments

Embed Size (px)

Citation preview

Progressive.Net 2016 @scottcowan

21st June 2016

Build and Deployments

Builds•Versioning

•Packaging

•Selective triggering

•Shared code

Deployments• Deployment tests

• Blue / Green deployments

• Consumer Driven Testing

• Dark Launching

Agenda

Your build and deployments are different

And deploying your application is different

than releasing it to users

Builds

Compile Test Package

Versioning

MAJOR.MINOR.PATCH• MAJOR breaking changes• MINOR feature release• PATCH bug fixes

Package Versions

• 1.0.521• 1.0.521-develop• 1.0.0.521• 1.0.0-hotfix.521

Assembly Versions

• 1.0.521.0• 1.0.0.521

Versioning

Versioning

AssemblyInfo.cs[assembly: AssemblyInformationalVersion("1.0.521-develop")][assembly: AssemblyVersion("1.0.521.0")][assembly: AssemblyFileVersion("1.0.521.0")]

Versioning

Store it in a fileVersion.txt

0.9

Appveyor.yml# version formatversion: 0.9.{build}

Selective Triggering

Selective Triggering

• Only create a package when something has changed• More integration testing

Selective Triggering

NuGet packages

• Pull

• Discoverable (nuget.org)

• Unexpected users

• Just enough documentation

Project references

• Push

• Team knowledge

• Dangerous to reuse

• Handover notes

Shared Code

Shared Code

Deployments

Deploy Configure Verify

Deployment Tests

Is it Happy?

Deployment Tests

App v1.0.1

App.Tests v1.0.1

Deploy

Check application version

Get deployment tests

Run testsV1.0.1

Consumer Driven Testing

Integration tests from the perspective of your service’s clients

Consumer Driven Testing

Example service

API

Web

Consumer Driven Testing

Broker

Web

APIV1.2.1

Web/Api Tests V1.0.1

Web v1.0.1

API

Build

Build

Consumer Driven Testing

BrokerAPIV1.2.2

Web/Api Tests V1.0.1

Get consumer tests for API

Current version

Run tests

Deploy

Consumer Driven Testing

BrokerAPIV2.1.5

Web/Api Tests V1.0.1

Get consumer tests for API

current version

Run tests

Deploy

Blue Green Deployments

Have two environments that could be live

Blue Green Deployments

Blue Green Deployments

Dark Launching

Previewing features to a small set of users to test your application in the wild

Dark Launching

1.1.0

Feature 1

1.1.0

Feature 1

Some books

Thank you

Scott Cowan@scottcowan