SlideShare utilise les cookies pour améliorer les fonctionnalités et les performances, et également pour vous montrer des publicités pertinentes. Si vous continuez à naviguer sur ce site, vous acceptez l’utilisation de cookies. Consultez nos Conditions d’utilisation et notre Politique de confidentialité.
SlideShare utilise les cookies pour améliorer les fonctionnalités et les performances, et également pour vous montrer des publicités pertinentes. Si vous continuez à naviguer sur ce site, vous acceptez l’utilisation de cookies. Consultez notre Politique de confidentialité et nos Conditions d’utilisation pour en savoir plus.
ALM Summit 3 - Setting up a Continuous Delivery Deployment Pipeline with TFS
Setting up a DeploymentPipeline with TFSJosé-Luis Soriajlsoria@plainconcepts.com@jlsoriat
Speaker Bio Chapter IOnce upon a time, there was a little kid whose name was José-Luis.Nobody knows the actual reason, but he began to be interested incomputers in the mid ’80s when, after so much careful consideration by hisparents, he received an 8bit computer as a present, along with some other stuffsuch as a bicycle and pajamas. That day he felt so happy with the bicycle, so frustrated with thepajamas, and somewhat confused about how to properly deal with the computer. Soon he started towrite all kinds of small and useless programs, but surprisingly none of them have made their way to being mentioned inthe history of computer programming. Several years later he went to university, where he studied Computer Science and signedup for the weirdest student associations. His strange inclination for Application Lifecycle Management began unexpectedly onesunny spring day when, while playing a soccer match, he was hit hard on the head by the ball and lost consciousness. When he woke up in bed athospital after a couple of days, all the words that came out of his mouth were about arcane and obscure matters related to version control systems,automated builds and similar kinds of esoteric no-brainers. From that moment on, his parents, close relatives and friends lost the small amount of hope they still had inJose’s ability to succeed in life and be a person of worth. This behavior has done nothing but get worse until the present day, when he travels around the world trying to
(shorter) Speaker Bio• ALM Team Leader at Plain Concepts• Professional Scrum Trainer for Scrum.org• From Madrid, Spain• Knows about Continuous Delivery with TFS ;-)
In This Session, You’ll Learn…What a pipeline is Potential benefitsWhy bother Success criteriaWho can use it Warning signsHow to implement it
The Cowboy Coder Pipeline COMMIT RELEASE FIGHT FIRES 188.8.131.52 184.108.40.206 220.127.116.11 AUTOMATED 18.104.22.168 ACCEPTANCE TEST MANUAL TESTING
The Bureaucratic Pipeline FILL ASK BOSS RESERVE SNEAK INT ACCEPT. MANUAL BRIBE THE COMMIT OFFICIAL FOR DEPLOY TICKET THE SERVE TEST TESTING PERMISSION AT IT DEPT. ADMIN ROOM FORM22.214.171.124.0.1.21.0.1.3 AUTOMATED NON- NON- NON- NON- NON- MANUAL126.96.36.199 ACCEPTANCE TESTING FUNCTIONAL FUNCTIONAL FUNCTIONAL FUNCTIONAL FUNCTIONA TEST TESTING TESTING TESTING TESTING TESTING
Instances:Changes, Builds or Versions AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TEST188.8.131.52.0.1.21.0.1.3 AUTOMATED NON-FUNCTIONAL184.108.40.206 ACCEPTANCE TEST MANUAL TESTING TESTING
The Waterfall-ish Pipeline AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TESTSpring 2008 Fall 2009Summer 2011
Run automated tests, smoke-test deploymentsWrite automated tests: MSTest, CodedUI, NUnit, xUnit, etc. Have the builds run these tests
Automate deployments, always deploy the same wayUse custom workflow activities or deployment scripts: Web Deploy, bat, PowerShell, etc. Use the same automations all the time, with environments as parameters
Self-service deployments Set up builds that trigger the automated deployment.Use the Build-Deploy-Test workflow in LabManagement, deactivate the Build and Test parts if needed.
Environment provision & management, prepare to back out changes Use Lab Management to provision and manage environments.Use environment snapshots to back out changes.For standard environments, automate backup and restore
Practices not covered or needing clarification
Build only once Rebuilding from source at each step can introduce unexpected changes that could lead to issues. Use the Lab build template for stages other that the Commit Stage.If you can’t use Lab, set up a simple build template only for deployment and testing.
Propagate changes through the pipeline instantlyModify build definitions so they trigger the next step in the pipeline automatically, when needed. You can use a custom workflow activity for this.For example, the QueueBuild activity from the Community Extensions http://bit.ly/14vEEg3.
If any part of the pipeline fails, stop the lineFor automated steps, only trigger them if the previous one has been successful.
View pipeline status Write a custom dashboard.An easy option is to use OData for TFS (http://bit.ly/UDbiID). AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TEST 220.127.116.11 18.104.22.168 22.214.171.124 AUTOMATED NON-FUNCTIONAL 126.96.36.199 ACCEPTANCE TEST MANUAL TESTING TESTING
Further improvements• Version builds: Versioning workflow activity from Community TFS Build Extensions (http://bit.ly/14vEEg3)• Build in parallel: parallel workflow activity, Parallel Template (http://bit.ly/VvSD4k)
Further improvements: Version Builds• Versioning workflow activity from Community TFS Build Extensions (http://tfsbuildextensions.codeplex.com/)
Lab Management is going tosave you a lot of work. Use it!
Transparent and predictable delivery process AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TEST188.8.131.52.0.1.21.0.1.3 AUTOMATED NON-FUNCTIONAL184.108.40.206 ACCEPTANCE TEST MANUAL TESTING TESTING The pipeline reflects at any moment the way software is delivered, and the status of that process.
Less defects in productionNo reds ever reach the Release column. No regressions. AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TEST220.127.116.11.0.1.21.0.1.3 AUTOMATED NON-FUNCTIONAL18.104.22.168 ACCEPTANCE TEST MANUAL TESTING TESTING
Flexibility to cope with changes AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TEST22.214.171.124.0.1.21.0.1.3 AUTOMATED NON-FUNCTIONAL126.96.36.199 ACCEPTANCE TEST MANUAL TESTING TESTING Changes can be addressed in one or more new instances of the pipeline. Everything is already set up and ready.
Useful and actionable feedback AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TEST 188.8.131.52 184.108.40.206 220.127.116.11 AUTOMATED NON-FUNCTIONAL 18.104.22.168 ACCEPTANCE TEST MANUAL TESTING TESTINGFeedback is obtained multiple times, for every change (instance) that gets into the pipeline. There is more information, it arrives earlier and it’s more focused.
Shorter time to deploy and release AUTOMATED COMMIT MANUAL TESTING RELEASE ACCEPTANCE TEST 22.214.171.124 126.96.36.199 188.8.131.52 AUTOMATED NON-FUNCTIONAL 184.108.40.206 ACCEPTANCE TEST MANUAL TESTING TESTINGDeployment is done automatically across most of the stages. Release is done frequently, for each change, so it’s a predictable and optimized process.
Big ball of mudA BIG BALL OF MUD is haphazardlystructured, sprawling, sloppy, duct-tapeand bailing wire, spaghetti code jungle.http://www.laputan.org/mud/mud.htmlYou CAN Continuously Deployspaghetti to a BIG BALL OFMUD. That’s not ContinuousDelivery.
Continuous Deployment is only a part of the whole picture! Continuous Delivery Automate environment Smoke-test provision deployments Propagate changes through Continuous Self-service …and much more!!! the pipeline Deployment deployments View pipeline status Test Build only Automation once Stop the line Deploy the same way to every Have a rollback environment procedure
Summary• A Continuous Delivery pipeline can address many typical problems with the software development process.• Visual Studio + TFS, with some customization, are suitable for setting up a pipeline (better with Lab Management).• When properly implemented, it can bring many benefits.• You have to watch out for some common warning signs.