Adrian marinica continuous integration in the visual studio world
-
Upload
codecampiasi -
Category
Technology
-
view
66 -
download
1
description
Transcript of Adrian marinica continuous integration in the visual studio world
Continuous Integration in the Visual Studio world@ADRIANMARINICA – SOFTWARE DEVELOPER AT MAXCODE
AgendaCONTINUOUS INTEGRATION
RELEASE MANAGEMENT
Q&A
Continuous IntegrationBEST PRACTICE OR BEST GIMMICK?
Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day.
Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.
Martin Fowler
Success – a ten step list1. Maintain a Single Source Repository
2. Automate the Build
3. Make Your Build Self-Testing
4. Everyone Commits To the Mainline Every Day
5. Every Commit Should Build the Mainline on an Integration Machine
6. Keep the Build Fast
7. Test in a Clone of the Production Environment
8. Make it Easy for Anyone to Get to the Latest Deployment
9. Everyone can see what's happening
10. Automate Deployment
How do people do it?
Flickr
>80 deploys a week >16 deploys a day
>1 deploy every half an hour
Google consumer surveys
8 minutes from code commit to production
2 releases per day
Amazon
1 change every 11.6s
HP LaserJet Firmware Overall development costs reduced by ~40% Programs under development increased by ~140% Development costs per program reduced by 78% Resources driving innovation increased by 5x
This sounds awesome!BUT WHAT’S THE CATCH?
Anti Continuous Integration slideSUCCESS OF CONTINUOUS INTEGRATION DEPENDS ON THE STRENGTH OF THE SYSTEM AND THE DEGREE OF TEST-COVERAGE
Time consuming things that you need to do:
Think if you actually need CI Build, configure, automate and maintain the CI system
Write tests to check the quality of the code / build
If you want to Continuously Integrate…
… here’s a shortlist:
1. Source control
2. Build
3. Deploy
Maintaining the codebaseFIRST THINGS FIRST
Git FlowTERMINOLOGY
Branches• master• develop
Feature
Release
Hotfix
BENEFITS
Lightweight branching system
Parallel development
Collaboration
Release staging
Support for hotfixes
Git Flow
How Flickr does it No additional branches, only a head branch
Flags for features with configurable values:• enabled• disabled• enabled for host X • disabled for host X
if ($cfg.enable_unicorns) {
// do something new and amazing
}
else {
// do the current boring stuff
}
Release ManagementA USE CASE
Do you / your company? Use Team Foundation Server
Use Visual Studio
Use Test Manager
Develop medium-large scale .NET solutions
Then you have to try out Release Management
But how does Release Management help? Team Foundation Server offers:• Work management (boards, stories,
tasks, etc.)• Source Control (TFVC, Git)• Test management• Build system
Team Foundation Server does not offer:• Deploy system
CodeCamp use-case Have a web application that you wish to deploy on 3 environments:
Test – for QA
Stage – for simulating the production
Production – offer the changes to the end-user (fully functional and tested)
TESTSTAGEPROD
DEV
Developer pushes code
Trigger build
Build serverSource control
Drop location
Drop build
Release Management
Trigger deploy
NotifyApproveNotifyApprove
Demo
Questions?