Continious integration using .net framework
 

Continious integration using .net framework

on

  • 567 views

 

Statistics

Views

Total Views
567
Views on SlideShare
567
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Continious integration using .net framework Continious integration using .net framework Presentation Transcript

  • Continuous Integration .NET Framework December 4th, 2012www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054 ©2012 InfoStretch Corporation. All rights reserved.
  • Agenda Objective Client Case Study Investigation CI Architecture SCM - TFS CI Modules Culture Change Q&Awww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054 ©2012 InfoStretch Corporation. All rights reserved.
  • • Continuous Integration … see Martin Fowler’s quote • CI is a marathon not a sprint. • Effective software continuous integration solutions need to be agile life cycle to facilitate your organizations growth toward software release agility. Continuous Integration is not THE silver bullet that will solve your issues – it is the culture change.www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Client Case Study A web based product has well over hundred unplanned deployments to production annually. How can continuous integration (CI) help us here? We engaged with the client to assess their CI and agile scrum needs. Objective: Define the CI flow and architecture. Understand the culture – listen to the architects, release engineers, managers, software leads, QA leads, product managers – i.e. unit tests, deployment, automated tests, SCM Understand the SDLC processes – Is it documented? Communicate the objective - Organization ROI from CI. Agile CI phased solution – Phased deliverableswww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Content • CI Flow and Architecture • Detail Design • Reportswww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Overall CI Flow and Architecture Jointly architected CI flow and objectives with emphasis on code coverage to improve both unit and regression test coverage; and one click deployment to production. Following slides are details of the below modules in .NET environment. Centralized Jenkins distributed build server Pre- tfs Build Deploy Commit Deploy Environments EnvironmentsEnsure Build Environmentssuccess & passesunit test Development Publish / Tests QA Deploy Staging Release Production CandidateScrum Team NCoverdeclares RC Code Coverage Reportswww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Why Jenkins? Jenkins’ core strength: • Simplicity • Reporting • Flexibility • Modular Design • Uses Forms to Configure Projects together to form a solutions. As organization CI matures, additional modules can be integrated to existing CI Flow. Software Test Types Code Smoke Build Regression Coverage Deploy Publishwww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • TFS Repository – Source Control Strategy CHECKOUT Development on branch or on trunk? TFS Label applied at release candidate. V5.5 Release Branch V5.6 Release Branches V5.5_Test Branch V5.6_Test Branch Jenkins Software Build merge Stream Polling (20 minutes) tfs At RC /TLS/v5.5/trunk Jenkins Regression Test /TLS/v5.5_Test/trunk Build Stream Notes – 1. Dependent DLL change will trigger clean build. 2. New Jenkins job for each version / branch Branch ONLY if Necessary – 3. Source code and automated regression test Production Bug fixes that cannot pull source code trigger different Jenkins job. 4. Apply TFS Label and branch at Release in the in development changes. Candidate if necessary 5. Release candidate criteria needed.www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Pre-Commit Steps Pre-Commit How to ensure Jenkins have high software build success rate? Developers are to perform the following steps prior to checking in their code to TFS. Use TFS to enforce code check-in policy. Checkout Write Unit All Unit Test Re-sync with Modify code Code Review Code* Test Passed latest Commit to TFS with All Unit Test defect ID & comments Passed Note: *Policy around Solution File Needed and recommended to be code review Legend Optional Next Slidewww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Software Software Build Stream BUILD Describes the whole software build stream and verify no regressions as much as possible. This is a Jenkins job. Unit Tests Code Coverage @Jenkins workspace Source Checkout Solution File PrecompileWeb MSTEST NCover Code from MSBUILD Folder/bin/release latest / label Go to Smoke Publish Test Job MSDeploy Reports FXCop Static Code Analysiswww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Software Solution File BUILD Central and crucial input to the software build stream is the Product’s solution file. An error in the solution file can break the build stream. It is crucial that a Solution File policy should be put in place. Jenkins dependencies on the Solution File (*.sln)  Build instructions to build both the product and unit tests  Precompiled artifact stored in Precompiled Web/bin/release folder  Solutions file build only valid projects. Project with invalid or missing project file will fail the build.www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Regression Test Build Stream Test BUILD Client uses Selenium framework and automated test suites. This is another Jenkins job. There are two smoke and regressions tests. At this time Jenkins have deployed the software to test environment. Nightly Runs Regression Checkout Tests Code from ANT Generate latest / label Reports to Jenkins Runs Smoke After every: + Source code changes + Test code changes + Configuration changeswww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Publish Release Candidate (RC) Release Candidate – Archive* the release software to the TFS and deploy to staging environment for QA manual and performance testing. Scrum team decides RC readiness and must satisfy RC criteria – i.e. No regression test failures. @Jenkins workspace From PrecompileWeb Go to Deploy Software Folder/bin/release TFS Check in Job Build Steps Label.build# TFS * Archiving to TFS at Release Candidate to save space on TFS.www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Deploy Job Deployment Deploying to test, staging and production environments. From Software build PrecompileWeb Test Environment Regression Folder/bin/debug MSDEPLOY Test Job Label.build# Staging Regression One Click to start TFS MSDEPLOY Environment Test Job Label.build# Production Smoke non One Click to start MSDEPLOY Environment destructive TFS Test Job One job for each co-location.www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Jenkins Reports – Case Study Identify the stake holders are accountable to the CI goals. Use the reports for improving culture, processes and next goal settings. This is actual screen shot from client Jenkins for a .NET product: TLSLegacy. Legends Jobs: Naming Convention TLSLegacy-Build-to-tclistage Polls TFS every 30 minutes for source code changes, builds and deploys to machine tclistage. Starts smoke test module. TLSLegacy-Smoke-to-tclistage Runs smoke tests. TLSLegacy-Regression-tclistage Runs Regression tests nightly TLSLegacy_RC Release Candidate Build TLSLegacy_deploy-stage1 Deploy to Stage 1 environmentwww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Jenkins Reports What will be some of the questions management may ask for Product: TLS Legacy? Through the use of this dashboard, we are showing how managers / leads can start ask questions to start a culture change. • Was there a build yesterday? • What is your plan to make all the status BLUE? • Why isn’t the smoke tests fixed immediately? • There was no build for the last 4 days? We should be fixing bugs in this phase?www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Jenkins Report – TLSLegacy Build Job This is the TLSLegacy software build jobs. October 12 is the release candidate milestone. Some questions as manager and lead can ask - • There was no bug fixes between Oct 3rd and 11th? Is this really true? • There are concern that management may start micro-managing the broken builds. • When can I see unit tests? • What was checked in for this build?www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Did developer check in the change? Often managers ask engineers if they have checked in the changes or not – engineers often feel they are being micro-managed. With each build, you can see what was checked into TFS. QA can see what changes went into the build. • Why are engineers not adding defect ids to their check ins? • For Build 33 – what flag was changed? • To developer – I think you forgot to change these files as part of your fix.www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Jenkins Report – TLSLegacy Smoke Tests This is the TLSLegacy smoke test job. You can see the smoke tests are trending toward stability. The smoke tests completes in about 20 minutes. Since there was no unit tests – management decided developers must check the smoke tests after their check ins once smoke tests are stable. • What is going on with this chart? • When will this chart show more stability?www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Jenkins Report – TLSLegacy Regression Tests There are about 600+ regression tests suites. From this chart, we see still have work to go to get the regression tests to be stabilized and all passing on consistent basis. • Management / Leads can monitor the progress and is it progressing according to plan. • When will this chart show more stability?www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Jenkins Configuration Jenkins uses a form based to configure the CI flow. This is for the build steps. • Define Source code repository and how to checkout files • How often to poll • Build the software • Deploys the software and configuration files • Report type configurationwww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Summary We have covered – • Continuous Integration is not a sprint but a marathon • CI Architecture and Flow and Modular design before implementation • Naming conventions • Source Control Management strategy • CI Flow – Builds, Test, Deployment and release candidate CI Flows • Report generation and sample questionswww.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Conclusion CI is a marathon not a sprint. It is a tool for culture change toward software development efficiencies and product quality. Key Points for Success • Recognition that CI is not a sprint but a marathon • Executive management support for continuous integration • Software engineers and management compliance • Set the reasonable expectation and goals • Designated Release Engineer Before you know it, you will wonder how you did product development without CI.www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.
  • Thank You!www.infostretch.com | 408.727.1100 | 2880 Lakeside Drive, Suite 200, Santa Clara, CA 95054©2012 InfoStretch Corporation. All rights reserved.