nightly build done right

Post on 27-Jun-2015

346 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Nightly Build Done RightLiora Milbaum

L.M.B.-Consulting/DevopsILliora@lmb.co.il

2

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

4

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

6

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

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

A nightly build is a neutral build which takes place automatically

9

High Level Steps

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

10

Environments

Dev Integration Testing Staging Production

11

Ingredients #1

Clean environment

12

Ingredients #2

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

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

13

Ingredients #3

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

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

14

Ingredients #4

Build Servers farm – same OS and tools setup for consistency

15

Ingredients #5

Integrating with Version Control System

16

Ingredients #6

Build Dependencies/Order

17

Ingredients #7

Version Numbering

18

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

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

Best Practicies

Object Oriented Design Multiple Build Options(Debug/Release,

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

21

22

top related