94
Introduction To Continuous Integration With Jenkins Sunshine PHP 2015 Eric Hogue @ehogue erichogue.ca 1

Introduction to Continuous Integration with Jenkins

Embed Size (px)

Citation preview

Page 1: Introduction to Continuous Integration with Jenkins

Introduction To Continuous Integration With Jenkins

Sunshine PHP 2015

Eric Hogue@ehogue

erichogue.ca 1

Page 2: Introduction to Continuous Integration with Jenkins

Wikipedia

the practice, in software engineering, of merging all developer working copies with a shared mainline several times a day

http://en.wikipedia.org/wiki/Continuous_integration

2

Page 3: Introduction to Continuous Integration with Jenkins

Automated Build

3

Page 4: Introduction to Continuous Integration with Jenkins

4

Page 5: Introduction to Continuous Integration with Jenkins

Self Testing

5

Page 6: Introduction to Continuous Integration with Jenkins

Fast

6

Page 7: Introduction to Continuous Integration with Jenkins

Continuous Integration

7

Page 8: Introduction to Continuous Integration with Jenkins

8

CI Tools

Page 9: Introduction to Continuous Integration with Jenkins

9

Page 10: Introduction to Continuous Integration with Jenkins

10

Page 11: Introduction to Continuous Integration with Jenkins

Builder

11

Page 12: Introduction to Continuous Integration with Jenkins

Build Results

12

Page 13: Introduction to Continuous Integration with Jenkins

Reports

13

Page 14: Introduction to Continuous Integration with Jenkins

Reports

14

Page 15: Introduction to Continuous Integration with Jenkins

Trends

15

Page 16: Introduction to Continuous Integration with Jenkins

Plugins

16

Page 17: Introduction to Continuous Integration with Jenkins

Chuck Norris

17

Page 18: Introduction to Continuous Integration with Jenkins

Ready

18

Page 19: Introduction to Continuous Integration with Jenkins

Demo Project

https://github.com/EricHogue/CIPresentation19

Page 20: Introduction to Continuous Integration with Jenkins

20

Page 21: Introduction to Continuous Integration with Jenkins

21

http://192.168.56.101:8080/

Page 22: Introduction to Continuous Integration with Jenkins

22

Page 23: Introduction to Continuous Integration with Jenkins

23

Page 24: Introduction to Continuous Integration with Jenkins

24

Page 25: Introduction to Continuous Integration with Jenkins

Plugins

● Git● Phing● Green Balls

● ChuckNorris

25

Page 26: Introduction to Continuous Integration with Jenkins

26

Page 27: Introduction to Continuous Integration with Jenkins

27

Page 28: Introduction to Continuous Integration with Jenkins

28

Page 29: Introduction to Continuous Integration with Jenkins

Code Location

29

Page 30: Introduction to Continuous Integration with Jenkins

When to Build

30

Page 31: Introduction to Continuous Integration with Jenkins

Build Tools

31

Page 32: Introduction to Continuous Integration with Jenkins

Phing

32

Page 33: Introduction to Continuous Integration with Jenkins

How to Build

33

Page 34: Introduction to Continuous Integration with Jenkins

How to Build

34

Page 35: Introduction to Continuous Integration with Jenkins

35

Page 36: Introduction to Continuous Integration with Jenkins

PHP Tools

36

Page 37: Introduction to Continuous Integration with Jenkins

Dynamic Tests

37

Page 38: Introduction to Continuous Integration with Jenkins

38

Page 39: Introduction to Continuous Integration with Jenkins

39

Page 40: Introduction to Continuous Integration with Jenkins

Failed Build

40

Page 41: Introduction to Continuous Integration with Jenkins

Publish PHPUnit Report

41

Page 42: Introduction to Continuous Integration with Jenkins

Publish PHPUnit Report

42

Page 43: Introduction to Continuous Integration with Jenkins

43

Page 44: Introduction to Continuous Integration with Jenkins

44

Page 45: Introduction to Continuous Integration with Jenkins

Publish Code Coverage

45

Page 46: Introduction to Continuous Integration with Jenkins

46

Page 47: Introduction to Continuous Integration with Jenkins

47

Page 48: Introduction to Continuous Integration with Jenkins

48

Page 49: Introduction to Continuous Integration with Jenkins

Static Tests

49

Page 50: Introduction to Continuous Integration with Jenkins

PHP_CodeSniffer

50

Page 51: Introduction to Continuous Integration with Jenkins

Publish Checkstyle results

51

Page 52: Introduction to Continuous Integration with Jenkins

52

Page 53: Introduction to Continuous Integration with Jenkins

53

Page 54: Introduction to Continuous Integration with Jenkins

54

Page 55: Introduction to Continuous Integration with Jenkins

PHP Depend

55

Page 56: Introduction to Continuous Integration with Jenkins

Publish JDepend

56

Page 57: Introduction to Continuous Integration with Jenkins

57

Page 58: Introduction to Continuous Integration with Jenkins

Classes

58

Page 59: Introduction to Continuous Integration with Jenkins

Coupling

59

Afferent Coupling Efferent Coupling

Page 60: Introduction to Continuous Integration with Jenkins

Abstractness

AC / TC60

Page 61: Introduction to Continuous Integration with Jenkins

Instability

Ce / (Ce + Ca)61

Page 62: Introduction to Continuous Integration with Jenkins

Distance

Idealized line → A + I = 162

Page 63: Introduction to Continuous Integration with Jenkins

Abstraction Instability Chart

63

Page 64: Introduction to Continuous Integration with Jenkins

Overview Pyramid - Inheritance

64

Average Number of Derived Classes

Average Hierarchy Height

Page 65: Introduction to Continuous Integration with Jenkins

Overview Pyramid - Size And Complexity

65

Page 66: Introduction to Continuous Integration with Jenkins

66

Page 67: Introduction to Continuous Integration with Jenkins

Overview Pyramid - Size And Complexity

67

Page 68: Introduction to Continuous Integration with Jenkins

Overview Pyramid - Coupling

68

Page 69: Introduction to Continuous Integration with Jenkins

69

Page 70: Introduction to Continuous Integration with Jenkins

PHP Mess Detector

70

Page 71: Introduction to Continuous Integration with Jenkins

Rulessets

71

Page 72: Introduction to Continuous Integration with Jenkins

Publish PMD

72

Page 73: Introduction to Continuous Integration with Jenkins

73

Page 74: Introduction to Continuous Integration with Jenkins

74

Page 75: Introduction to Continuous Integration with Jenkins

75

Page 76: Introduction to Continuous Integration with Jenkins

PHP Copy Paste Detector

76

Page 77: Introduction to Continuous Integration with Jenkins

Publish Duplicate Code Analysis

77

Page 78: Introduction to Continuous Integration with Jenkins

78

Page 79: Introduction to Continuous Integration with Jenkins

Violations

79

Page 80: Introduction to Continuous Integration with Jenkins

80

Page 81: Introduction to Continuous Integration with Jenkins

81

Page 82: Introduction to Continuous Integration with Jenkins

82

Page 83: Introduction to Continuous Integration with Jenkins

83

Page 84: Introduction to Continuous Integration with Jenkins

Email Notifications

84

Page 85: Introduction to Continuous Integration with Jenkins

85

Page 86: Introduction to Continuous Integration with Jenkins

More Notifications

86

Page 87: Introduction to Continuous Integration with Jenkins

87

Page 88: Introduction to Continuous Integration with Jenkins

Benefits

88

Page 89: Introduction to Continuous Integration with Jenkins

Quick Feedback

89

Page 90: Introduction to Continuous Integration with Jenkins

Metrics

90

Page 91: Introduction to Continuous Integration with Jenkins

Automation

91

Page 92: Introduction to Continuous Integration with Jenkins

Confidence

92

Page 93: Introduction to Continuous Integration with Jenkins

https://github.com/EricHogue/CIPresentation

Comments: https://joind.in/13462twitter: @ehogue

PHP Mentoring: http://phpmentoring.org/

93

Page 94: Introduction to Continuous Integration with Jenkins

● TrafficJam.jpg - Thomanication - https://www.flickr.com/photos/thomanication/6216702247● is_it_worth_the_time.png - xkcd - http://xkcd.com/1205/● LionSelfie.jpg - Silke Remmery - https://www.flickr.com/photos/silkeremmery/15856169578/in/faves-96579472@N07/● RacingDownTheRunway.jpg - Philipp Lücke - https://www.flickr.com/photos/philippluecke/6993495094/in/faves-96579472@N07/● PreciousTreasure.jpg - Dave Sutherland - https://www.flickr.com/photos/raptortheangel/12786162594/in/faves-96579472@N07/● ComputerBug.jpg - Brendan Dolan-Gavitt - https://www.flickr.com/photos/moyix/2352619003/in/faves-96579472@N07/● CatchItIfYouCan.jpg - Tim Mowrer - https://www.flickr.com/photos/mekin/281791343/in/faves-96579472@N07/● CILights.jpg - Jan Krutisch - https://www.flickr.com/photos/jankrutisch/4272142306/in/photostream/● ConductorFrederikMagleConductingASymphonyOrchestra10.jpg - Frederik Magle Music - https://www.flickr.

com/photos/frederikmagle/7026769687/in/photostream/● Ready.jpg - amanda tipton - https://www.flickr.com/photos/demandaj/6789626120● StaticWallpaper.jpg - James Spinks - https://www.flickr.com/photos/realjimbob/13270099● DynamicEarthCME.jpg - NASA Goddard Space Flight Center - https://www.flickr.com/photos/gsfc/7402440272● Containers.jpg - www.GlynLowe.comhttps://www.flickr.com/photos/batega/2056949264 - https://www.flickr.

com/photos/glynlowe/10921733615● MetricMania.jpg - Josep Ma. Rosell - https://www.flickr.com/photos/batega/2056949264● CheaperByTheYard.jpg - Bill Smith - https://www.flickr.com/photos/byzantiumbooks/16173360807● IHateWhenSomeoneLeavesaMessintheBathroom.jpg - e_monk - https://www.flickr.com/photos/e_monk/5931790591● FadeToGrey.jpg - Andreas Levers - https://www.flickr.com/photos/96dpi/2571056264● LCConversion.jpg - Ginny - https://www.flickr.com/photos/ginnerobot/2548843369● NotSoMiniBoot.jpg - Eric E Castro - https://www.flickr.com/photos/ecastro/6195349092● LEGOShip.jpg - Andrey Belenko - https://www.flickr.com/photos/belenko/4295897526● GrungeWarningSignDoNotReadThisSign.jpg - Nicolas Raymond - https://www.flickr.com/photos/80497449@N04/7417352980● Notifications.jpg - Ben Schumin - http://www.flickr.com/photos/schuminweb/9806474636/● MoreBrokenWindows.jpg - brainflakes. - https://www.flickr.com/photos/brainflakes/2763231289● Fragile.jpg - Eye - the world through my I - https://www.flickr.com/photos/ccpixel/● BalancingAct.jpg - Colin Harris ADE - https://www.flickr.com/photos/classblog/5136926303● Escalator.jpg - Adam Lederer - https://www.flickr.com/photos/elmada/2466685791● ZombieWeb.jpg - GollyGforce - Living My Worst Nightmare - https://www.flickr.com/photos/see-through-the-eye-of-g/8218600295● LegoMicroTrophy.jpg - David Luders - https://www.flickr.com/photos/42988571@N08/15965163069● GearWork2.jpg - Curious Expeditions - https://www.flickr.com/photos/curiousexpeditions/489992128● BobTheBuilder.jpg - clement127 - https://www.flickr.com/photos/clement127/15943249419● RulesRulesRules.jpg - Ricardo Liberato - https://www.flickr.com/photos/liberato/2292651755

94