47
Continuous Integration (CI

Continuous Integration

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Continuous Integration

Continuous Integration (CI)

Page 2: Continuous Integration

Motivation

Page 3: Continuous Integration

3

Integrate modules at late state of project

Traditionally, different modules are developed by different teams/developers

Page 4: Continuous Integration

4

The earlier you can detect problems, the easier it is to

resolve them

In Agile processes, any programmer can change any part of the code

Page 5: Continuous Integration

5

Definition

Page 6: Continuous Integration

6

• Continuous Integration is a software development practice where members of a team integrate their work frequently

• Each integration is verified by an automated build • Detect integration errors as quickly as possible • Assumes a high degree of tests

Continuous Integration

Page 7: Continuous Integration

7

Demonstration

Page 8: Continuous Integration

8

Continuous Integration Server

Source Repository

Developers

Solution: continually integrate and test throughout the project

Page 9: Continuous Integration

9

Developers check out code into their private workspaces

Page 10: Continuous Integration

10

Developers work on functionality and validate it by running unit tests and local build

Page 11: Continuous Integration

11

Developer update code to avoid conflicts

Page 12: Continuous Integration

12

Developers work on functionality and validate it by running unit tests and local build

Page 13: Continuous Integration

13

When done, they commit changes to the repository

Page 14: Continuous Integration

14

The CI server monitors the repository andchecks out changes when they occur

Page 15: Continuous Integration

15

The CI server builds the system and runs unit and integration tests

Page 16: Continuous Integration

16

The CI server releases deployable artefacts for QA testing

Page 17: Continuous Integration

17

The CI server assigns a build label to the version of the code that it just built

Page 18: Continuous Integration

18

The CI server informs the team of the successful build and generates useful metrics

Page 19: Continuous Integration

19

If the build or tests fail, the CI server alerts the team

Page 20: Continuous Integration

20

The team fix the issue at the earliest opportunity

Page 21: Continuous Integration

21

Continually integrate and test throughout the project

Page 22: Continuous Integration

Metrics

Page 23: Continuous Integration

23

Metrics generated by the CI server can be a useful indication of project “health”

Page 24: Continuous Integration

24

Metrics generated by the CI server can be a useful indication of project “health” (cont.)

Page 25: Continuous Integration

25

Reminder

Page 26: Continuous Integration

26

Check in frequently

Continuous Integration Reminder

Page 27: Continuous Integration

27

Don’t check in broken code

Continuous Integration Reminder

Page 28: Continuous Integration

28

Don’t check in untested code

Continuous Integration Reminder

Page 29: Continuous Integration

29

Don’t check in when the build is broken

Continuous Integration Reminder

Page 30: Continuous Integration

30

Don’t go home after checking in until the system builds

Continuous Integration Reminder

Page 31: Continuous Integration

31

“Oops, I did it again….”

• Peer pressure within team ensures policies are followed

Page 32: Continuous Integration

32

Practices of Continuous Integration

Page 33: Continuous Integration

33

Maintain a Single Source Repository

Practices of Continuous Integration

Page 34: Continuous Integration

34

Automate the Build

Practices of Continuous Integration

Page 35: Continuous Integration

35

Make Your Build Self-Testable

Practices of Continuous Integration

Page 36: Continuous Integration

36

Every Commit Should Build the Mainline on an Integration

Machine

Practices of Continuous Integration

Page 37: Continuous Integration

37

Keep the Build Fast

Practices of Continuous Integration

Page 38: Continuous Integration

38

Test in a Clone of the Production Environment

Practices of Continuous Integration

Page 39: Continuous Integration

39

Everyone can see what's happening

Practices of Continuous Integration

Page 40: Continuous Integration

40

Automate Deployment

Practices of Continuous Integration

Page 41: Continuous Integration

41

Conclusion

Page 42: Continuous Integration

42

Detect integration errors as quickly as possible

Continuous Integration

Page 43: Continuous Integration

43

Assumes a high degree of tests

Continuous Integration

Page 44: Continuous Integration

44

Always have a deployable build

Continuous Integration

Page 45: Continuous Integration

45

Generate metrics to guide project management

Continuous Integration

Page 46: Continuous Integration

46

Continuous Integration is Vital for Agile Development

Continuous Integration

Page 47: Continuous Integration

?Q & A