ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the...

23
CONTINUOUS INTEGRATION AND PRACTICES August 2010 Luohua Huang, Software Engineer, Build Release & Web Operations Team

Transcript of ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the...

Page 1: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

CONTINUOUS INTEGRATION AND

PRACTICES

August 2010 Luohua Huang, Software Engineer, Build Release & Web Operations Team

Page 2: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

2

AGENDA

1. Introducing Continuous Integration

2. CI Practices in Shenzhen office

3. Code Quality Control

4. Introducing Build Release Team

5. Q & A

Page 3: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

3

1. INTRODUCING CONTINUOUS INTEGRATION

Page 4: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

4

INTRODUCING CONTINUOUS INTEGRATION

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.

Many teams find that this approach leads to

significantly reduced integration problems and

allows a team to develop cohesive software

more rapidly.

Page 5: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

WHAT IS CONTINUOUS INTEGRATION(CI)?

5

Maintain a Single Source Repository

Checkin & Automate the Build

Everyone can see what’s happening

Make it Easy for Anyone to Get the Latest Execute

Make Build Self-Testing

Automate Deployment

Page 6: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

WHY CONTINUOUS INTEGRATION? The value of CI:

Reduced risks.

Reduce repetitive manual processes

Generate deployable software at any time and at any place

Enable better project visibility

Establish greater confidence in the software product from the development

team

6

In fact, CI has already been used widely for a long time and has been

accepted as a useful way to reduce the risk of integration and deployment.

Page 7: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

FULL LIFECYCLE CONTINUOUS INTEGRATION

PIPELINE

7

Page 8: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

CI IS FURTHER MORE THAN CONTINUOUS

COMPILATION CI is not used to find out compile error, although it can.

Compile is the most basic thing CI do, compile error is not acceptable

The target of CI is helping find out integration /deployment problems as earlier as possible.

Ideally, a successful build in CI should:

1. Compile succeeded

2. Passed all unit test

3. Unit test coverage reach the acceptable rate

4. Passed all functional test and regression test

5. Passed performance test

5. Passed user acceptable test if necessary

Any successful build of CI could generate a deliverable package, so CI could & should give confidence to team members that our product can be deployed to production at any time.

8

Page 9: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

CI NEED AND SHOULD WORK WITH OTHER AGILE

PRACTICES

CI is one of core practices of Agile, effective CI need the whole team follow

other practices, on the other hand, CI could work with other practices to

make the whole project better.

Test Driven Development

Automation Testing

Coding standard adherence

Refactoring

Small releases

Collective ownership

9

Page 10: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

BEST PRACTICES OF USING CI -

DEVELOPER

Commit code frequently

Don’t commit broken code

Fix broken builds immediately

Write automated developer tests

All tests and inspections must pass

Run private builds

Avoid getting broken code

10

Page 11: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

BEST PRACTICES OF USING CI –

QA/MANAGER QA:

Write effective automation test for CI

Keep test scripts up to date

Give feedback for each build

Project Manager:

Import CI at the beginning of the project

Summary requirements of CI system

11

Page 12: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

12

2. CI PRACTICES IN SHENZHEN OFFICE

Page 13: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

CRUISE

13

An advanced Continuous Integration and Release Management system

Implemented the most advanced CI theory

Is a distributed CI platform

Easy to configure and maintain

Can accept any kinds of artifacts

Clear hiberarchy: Pipeline -> Stages –> Jobs -> Tasks

Page 14: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

CRUISE

14

Page 15: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

HUDSON

15

Hudson (Open Source tool)

Hudson provides an easy-to-use so-called continuous integration system, making it

easier for developers to integrate changes to the project, and making it easier for

users to obtain a fresh build. The automated, continuous build increases the

productivity.

Most important is Hudson provide better integration with Maven

15

Page 16: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

HUDSON

16

16

Page 17: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

SHENZHEN CI SYSTEM STRUCTURE

17

Page 18: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

4. INTRODUCING BUILD RELEASE TEAM

18

Page 19: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

INTRODUCING BUILD RELEASE TEAM

19

Source code management -->

Source control system (like CVS, SCCS, Subversion)

setup and maintenance

Setup and monitor daily continuous/production builds

Co-ordinate with the development team in case of build

failures

Update build tools as per changes in the product

output/strategies

Create branches and setup separate build system after

a milestone releases

Create build storage archives for back tracking builds

Page 20: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

INTRODUCING BUILD RELEASE TEAM

20

Cross team co-ordination -->

Gather build specifications from the technical team

Document build instructions for the development team

Participate in release/milestone planning and scheduling with the product team

Announce and communicate vetted builds to QA and the documentation team

Work with the localization team to produce multi-language bits

Work with the sustaining team during product patches/upgrades

Coordinate with other dependent groups for their product milestone bits, e.g. aplication server, jdk, etc.

Page 21: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

INTRODUCING BUILD RELEASE TEAM

21

Build output -->

Setup kit server for build storage

Setup a cache server for storing other product bits or

third party bits

Upload bits for internal and external customers

Create CD/DVD iso images and physical media

Code Quality Control-->

Setup code standard?

Monitor code quality trend

Page 22: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

INTRODUCING BUILD RELEASE TEAM

22

Software Engineering -->

Agile & CI governed

Automated the more the better

Workflow optimized

Page 23: ONTINUOUS INTEGRATION AND RACTICES · CI is one of core practices of Agile, effective CI need the whole team follow other practices, on the other hand, CI could work with other practices

5. Q & A

23

What I like most about programming is that everything comes with a reason