+ All Categories
Home > Technology > Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Date post: 17-Jan-2015
Category:
Upload: atlassian
View: 1,164 times
Download: 1 times
Share this document with a friend
Description:
Peer Code Review: In a NutshellDevelopment is inherently collaborative. So why aren't you doing code review? This session discusses the importance of collaboration around your source code, the impact code review can have on development teams, and offers guidance on how to get started.Atlassian Speaker: Matt QuailCustomer Speaker: Patrick Coleman of DashKey Takeaways: * Peer code review explained * Benefits and approaches to effective code reviewThe Tantric Team: Getting Your Automated Build Groove OnWant to take your build automation to the next level? This session explains the process of setting up an automated software development infrastructure using the Atlassian tools, focusing on continuous integration. This session outlines key steps involved in automating a typical Java project using Ant, Bamboo, FishEye, Clover, JIRA and a large cast of other supporting tools.Customer Speaker: Rik Tamm-DanielsKey Takeaways: * Continuous integration how-to * Integrating multiple Atlassian tools, along with other development infrastructure
Popular Tags:
41
Matt Quail, Atlassian Patrick Coleman, Dash Navigation Peer Code Review: In a Nutshell
Transcript
Page 1: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Matt Quail, Atlassian Patrick Coleman, Dash Navigation

Peer Code Review: In a Nutshell

Page 2: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Agenda

  Introduction (Matt) o Code Review, Crucible and Atlassian

  Code Review at Dash (Patrick) o Introduction of Crucible to SW Engineering o Addition of Fisheye for Code Reviews

  Q & A

Page 3: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Introduction

Page 4: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Patrick Coleman

Fisheye & Crucible At Dash Navigation

Page 5: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Tools Used By Dash Prior to Adding Crucible   Source Control – Perforce   Issue Tracking – JIRA   Wiki – Confluence   Repository Viewer – Fisheye   Continuous Build – Pulse   Static Code Analysis – Coverity   Code Coverage - Clover   Code Review – Manual (i.e. no SW Tool)

Page 6: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Objectives for Adding Crucible to Dash   Increase Code Quality

o Catch Defects in the source versus QA filing bugs

o Facilitate non-defect code improvements by engaging more than one SW Engineer on a piece of SW

  Minimize Impact to SW Engineers o Reviews take place when Engineers want o Remote Engineers are not penalized

Page 7: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Step 1 – Crucible Evaluation

  Installed a 30 day evaluation of Crucible   Recruited a handful of Senior Engineers to

use Crucible   Performed real reviews on current projects   Discussed with trial users what they liked/

disliked o  From this feedback we identified points of

confusion that needed documentation on our Wiki o  Found task of creating a pre-commit review to be

too time consuming (i.e. engineers wouldn’t do it)

Page 8: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Step 2 – Prepare for Team Wide Rollout   Created Wiki Page with basic

instructions on how to create and participate in a Crucible Review

  Created a script to simplify the task of creating a diff file for pre-commit reviews

Page 9: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Step 3 – Crucible Rollout

  Announced to Entire SW Team the Addition of Crucible

  Intentionally did not have SW Managers create reviews

  Senior Engineers who participated in evaluation created reviews against their own submissions (this was not planned it just occurred organically)

  Most of the time an engineer was introduced to Crucible as a reviewer rather than having their own code reviewed

Page 10: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Crucible – 12+ Months Later

  Crucible is broadly viewed as an effective way to review both code changes and new code

  Majority of reviews are created by the author   Release Managers selectively create reviews

for changes made near to release points   Marking reviews as complete has never fully

taken hold but does not appear to detract from the value of conducting reviews in Crucible

Page 11: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Review Example

Page 12: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Fisheye - Continuous Code Review via Email Notifications   Hyperlink to Changelist in Fisheye   Hyperlink to Issue in JIRA   Submission Comment   Magnitude of Change   Hyperlink to File by File Diffs   Superior to SCM Notifications for above reasons

Page 13: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Fisheye - Release Management Code Review

  Use Fisheye to approve each code submission into weekly QA Build

Page 14: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Fisheye – Build to Build Reviews

  Use Fisheye to bracket changes from build to build

  Identify likely sources of defects by inspecting code changes

Page 15: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

Build Automation: How to do Bamboo

Rik Tamm-Daniels VP, Engineering June 2nd, 2009

Page 16: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Located in Newton, MA •  Founded August 2007 •  45+ Employees •  What we do: Unified Information Access

About Attivio

Page 17: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Attivioʼs Active Intelligence Engine –  Unified Information Access Platform –  Query Unstructured and Structured Information with

the Precision of SQL and the Fuzziness of Search •  Shipped Product (OEM and Direct)

–  Maintenance Release Window at the end of each sprint

–  Minor Release every 3-4 months –  Major Releases Every 12-18 months

What are we building?

Page 18: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Automate Everything •  Everything builds off of Bamboo •  Maintain High-Quality

–  8000+ Automated Tests –  Code coverage using Clover –  Static Analysis: Findbugs

•  Source code insight/Build Failure Investigation –  Fisheye

Builds @ Attivio

Page 19: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Our Code Base •  100% Java (core product; 95% including add-on

modules) •  Grails •  Flex •  C++ (3rd Party Code + Wrappers)

•  Installer (Install4J) –  Java based installer –  XML configuration + Graphical UI

Key Product Stats

Page 20: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Platforms –  Linux –  Windows –  Solaris –  32 and 64-bit

Supported Platforms

Page 21: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  ANT –  Heavy Use of MacroDefs –  Custom Ant Tasks –  Custom JUnit Wrappers for Testing –  Generalized Model (Maven like Ant Structure) –  Heavy use of AntCall and Ant tasks –  Top – Level directory build-import.xml defines all the tasks

that are used by sub-projects –  Dependency management MacroDef at top level inherited

by sub tasks •  Source Control

–  Subversion

Build System

Page 22: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

Attivio Build Directory Structure

A=vio

Common(3rdParty) App Core

Component1

Component2

Modules

Module1 Module2 Module3

Customers

Customer1 Customer2 Customer3

Installer

Page 23: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

Component

build

classes dist kit doc clover findbugs checkstyle

src

com

a=vio

test

com

a=vio

Attivio Build Directory Structure (Cont.)

Page 24: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

Branching Methodology

Source:Collabnet

Page 25: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  We use the Unstable Branching Strategy –  Fits with the agile methodology better that the Agile

Branching strategy •  No need to deal with too many branches •  Since our modules are already self contained we are

continually integrating all modules right in trunk •  Less merging more branching •  Ready to release code at any time without merging or

branching –  In large part because of our test coverage –  Having system, integration, smoke and performance testing as

part of our daily activity

Branching Methodology

Page 26: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  We use Bamboo for Continuous Integration, Nightly Builds and System Test Builds –  Continuous Builds run on each check-in –  Nightly Builds of each Branch are scheduled –  System Test Builds depend upon Nightly Builds

•  All Bamboo Agents run on VMWare Virtual Machines

Bamboo

Page 27: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

Linuxx64VM

DefaultAgent

Linuxx64VM

Con,nuousTrunkBuild

FullNightlyBuild

Linuxx64VM

OldVersionCon,nuous

Linuxx64VM

QAInstall/SystemTests

Linuxx86VM

FullNightlyBuild

Windowsx86VM

CodeCheck

FullNightlyBuild

Windowsx64VM

FullNightlyBuild

Solarisx64VM

FullNightlyBuild

Build Agent Configuration BuildAgent

BuildType

Page 28: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Trunk Continuous – check-in triggered •  Trunk Nightly Full (Windows, Linux, Solaris) •  Code Check – Clover, Findbugs, Corbertura,

FlexCover •  System Test •  QA –Product Installer is run on isolated VMs •  Supported Version Continuous •  Support Version Full •  Move Head Tag – ensures consistent SVN version

for all nightly builds

Build Plans

Page 29: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On
Page 30: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Nightly builds are scheduled •  Version Consistency

–  An SVN tag is built using a “Move to Head Tag” Plan –  OS Specific builds are kicked off on the tag –  Code coverage Plan is kicked off on the tag –  System Test Plan kicked off on the tag

•  Artifacts –  Short-circuit default behavior –  Send to NFS mount via symbolic link

Nightly Builds

Page 31: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On
Page 32: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On
Page 33: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Run separately from other builds to reduce build times

•  Produces Code Coverage Artifacts –  Clover –  Cobertura –  Findbugs

•  We donʼt use Bambooʼs integrated Clover Report because it doesnʼt ft our build directory structure (each module built separately)

Code Coverage Build

Page 34: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On
Page 35: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Runs system tests –  Installs our product to one or more nodes –  Runs functional and/or performance tests –  Tests produce JUnit-like output

System Test Build

Page 36: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On
Page 37: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  QA picks up the latest successful build artifacts –  Post Build plug-in called to tag successful,

unsuccessful and unsuccessful builds that just had test failures.

•  QA runs multiple Plans testing customer specific, system, performance and scalability tests from Bamboo

•  All QA tests are written using a custom JUnit framework

QA Builds

Page 38: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On
Page 39: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Java Docs automatically generated via ANT task and written to the Confluence Wiki

•  Hotfixes are posted on and linked from Confluence to the Artifact Repository

Post-Build Automation

Page 40: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

•  Why do we do Bamboo? –  Quality, quality, quality –  Time-to-market –  Release Flexibility

Takeaways

Page 41: Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated Build Groove On

©2007Confiden,al&Proprietary.AllRightsReserved.

Questions?


Recommended