nightly build done right

22
Nightly Build Done Right Liora Milbaum L.M.B.-Consulting/DevopsIL [email protected]

Upload: liora-milbaum

Post on 27-Jun-2015

346 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Nightly build done right

Nightly Build Done RightLiora Milbaum

L.M.B.-Consulting/[email protected]

Page 2: Nightly build done right

2

Page 3: Nightly build done right

A program was made out of a single source file

Command Line was used to create a deployable object from a single source file

$ gcc –c main.c –o a.out

3

Page 4: Nightly build done right

4

Page 5: Nightly build done right

A program was made out of multiple source files

Command Line was not an option to create a deployable object

Make scripting language executed a serious of compile/link steps in a specific order (outcome - incremental build)

5

Page 6: Nightly build done right

6

Page 7: Nightly build done right

Build Process grew more complex› Components/Layers/Multiple Products› Pre/Post steps

“build automation” (BA) – build infrastructure & management (make, ant, MSBuild, Maven, Jenkins, Bamboo, TeamCity, RTC…)

Nightly Build is a Practice which became popular in the late 90s after Microsoft published its development practices

7

Page 8: Nightly build done right

Neutral Build

A software build which reflects the current state of the checked in (baselined) code

In a neutral environment – integration (not the development environment)

The build created for the software QA department for testing purposes

8

Page 9: Nightly build done right

A nightly build is a neutral build which takes place automatically

9

Page 10: Nightly build done right

High Level Steps

Source Control Compilation/Link Packaging Tests Delivery/Deployment Documentation/Release Notes

10

Page 11: Nightly build done right

Environments

Dev Integration Testing Staging Production

11

Page 12: Nightly build done right

Ingredients #1

Clean environment

12

Page 13: Nightly build done right

Ingredients #2

Build Infrastructure – makefiles/ant files/Visual Studio solution and project files….

› Source Code Directory Structure› Compiler/Linker options› Environment Variables

13

Page 14: Nightly build done right

Ingredients #3

Build Management› Build Artifacts› Which Defects/Features are included in the

Build Result?› Log file(s)› Build Results

14

Page 15: Nightly build done right

Ingredients #4

Build Servers farm – same OS and tools setup for consistency

15

Page 16: Nightly build done right

Ingredients #5

Integrating with Version Control System

16

Page 17: Nightly build done right

Ingredients #6

Build Dependencies/Order

17

Page 18: Nightly build done right

Ingredients #7

Version Numbering

18

Page 19: Nightly build done right

Benefits

Reliability – source code do not change during the build

Minimizes integration risk Improves quality Time saver

<# developers> x < build time> x <# working days>

19

Page 20: Nightly build done right

More Info

Nightly Build (NB) is periodic, run overnight when more time (6-8 hours)

Resource-Intensive Performed by virtual user (builder) Decoupling the build process from

specific IDEs Successful Build Results are used for

next day development

20

Page 21: Nightly build done right

Best Practicies

Object Oriented Design Multiple Build Options(Debug/Release,

32bit/64bit….) Software Components No checkout during build

21

Page 22: Nightly build done right

22