• No results found

Continuous Integration

N/A
N/A
Protected

Academic year: 2021

Share "Continuous Integration"

Copied!
45
0
0

Loading.... (view fulltext now)

Full text

(1)

Continuous

Integration

CODEFUSION Sp. z o.o. ul. Powstańców Śląskich 25/18 45-086 Opole, Poland +48 77 54 53 312 info@codefusion.pl

How painful was your last release?

 Marcin Kawalerowicz

(2)

 After the session you will know what

continuous integration (CI) is and why it’s worth to use it.

 You will be able to build small but complete

CI process.

(3)

It is an

automated process

that

builds

(link, compile, tests, analyzes, deploy,

…) the software after

each change

in

source code, to

ensure

its

health

(weather

it

functions

correctly,

follows best practices, is deployable,

…) provides

immediate feedback

(4)
(5)
(6)

• To fight the “integration hell”

• To detect every drop in source code quality • To reduce risk

• To increase the software development process

transparency

• To increase the quality of software

• To ensure good practices and rule obedience

while coding

• To develop faster with fewer bugs • To easily create deployable software

• Side effect: ensure smooth start for new

(7)
(8)

Prepare -> Check-> Compile -> Test/deploy-> Problem? -> Wait->

(9)

Source code control

Build automation

CI server

Feedback mechanism

Unit testing framework

Code analysis

(10)

Use version control – no excuses!!!

Vanilla CI server

Everyting in repo

Including: libs, tools, scripts

Excluding: SDKs, Frameworks

Clean project strucure

(11)

• Keep everything you need in repository • Organize files in groups

(12)

• Script as text

• Under version control in the same repo • Path agnostic

• Of course DRY – don’t repeat yourself (use

variables, externalize configuration, use system variables, parametrize)

(13)

• Is it still a duel?

NAnt MSBuild OpenSource  

Cross-platform  

Good if you already know Ant  

Build-in to .NET Framework  

Integrated with Visual Studio  

Actively developed  

(14)

Transition from directed graph

(15)

• How much money do you have to spend? • Do you want to pay the angle bracket tax

(XML) – configuration overhead?

• Is it supporting the tools that you need? • How good is the documentation and

support?

• Does it do what you want it to do?

• Does it do more than you need not just

now but into the future?

• Is it easy to use? • Is it cool and hip?

(16)

Aspekt TFS Hudson/Jenkins TeamCity CC.NET Koszt Konfiguracja Narzędzia Dokumentacja Funkcje Dodatki Łatwość użycia Cool

(17)

Bamboo

Anthil

Cruise

Go

…CI is about what people do, not about what tools they use

(18)
(19)

• Manual / Forced

• Continuous Integration

• Poll vs. Push (using hooks)

• Rolling build (every x check-ins or x

seconds)

• Scheduled (Daily / Nightly / Weekly / …) • Triggered by another build

(20)
(21)
(22)

• make your unit tests fast and unambiguous • have your unit tests as few dependencies as

possible

• let errors drive your unit tests • mock external interfaces

(23)

Tools:

Selenium (Web)

White Framework (Win, Silverlight)

Fitnesse (Acceptance)

Visual Studio UI Automation (Web,

(24)

Unit Integration Functional System Other CI Not everything considerable for CI

(25)

Unit tests Integration

tests System tests Other tests

perform the quick tests at the

beginning

(26)
(27)

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

(28)

• FxCop / VS Code Analysis • IL code analyze

• FxCop and Visual Studio Code Analysis • Extending FxCop

(29)

• StyleCop

• C# code analyze

• Extending StyleCop • CI integration

(30)
(31)

• give information about any decrease of

your code quality

• be quick

• be able to provide information in diverse

art

• point to the specific place that caused

this deterioration

• be accessible to any team member,

(32)

• Tray notifiers • Alternative notifiers • Email • Sms • Instant messaging • Gadgets

(33)
(34)

no one pulls anything from source

control

.

The source is broken so no one should be interested in broken code

someone should jump right in to

fix the problem

,

preferably the person that caused it, but volunteers are welcome •

all the commits to the repository

are withheld

until the build is fixed. If you push good code into a spoiled

repository your code might get the smell too

(35)

Why not?

Database as script (in repo)

Automatic DB creation

Automatic DB migration and seeding

Parameter externalization

(36)

Liquibase

Dbdeploy

MIGRATEdb

Dbmaintain

AutoPatch

(37)

Generating documentation (Sandcastle)

Deployment (Wix, MSDeploy)

UI automation

XML-Dokumentationskommentare in Quellcode

XML Dokumentation

(38)
(39)

• Getting x last build to success

(40)

• When:

• Code base / test no. increases -> build

time increases

• Teams growth

• No. of projects grows • Then

• Create targeted builds (dev build, qa build) • Write fast unit tests

• Smaller teams with local integration servers • Modularize the code base

• Scale hardware

• Add more build agents • Parallelize

(41)

• Quick integration = more frequent integration =

high quality source code

• It should

take no more then 5-10 minutes.

Scaling Continuous Integration, R. Owen Rogers,

Lecture Notes in Computer Science, 2004, Volume 3092, Extreme Programming and Agile Processes in Software Engineering, Pages 68-76

(42)

Software Developer + IT Professional

= Build Master DevOps

(43)

Continuous delivery

Deployment pipeline

Commit stage

Acceptance stage

Self serviced

deployments

(44)
(45)

CODEFUSION Sp. z o.o. ul. Powstańców Śląskich 25/18 45-086 Opole +48 77 54 53 312 info@codefusion.pl  Marcin Kawalerowicz  CEO | CODEFUSION Sp. z o. o.  www.codefusion.pl  marcin@kawalerowicz.net  Blog: www.iprogrammable.com  LinkedIn: www.linkedin.com/in/marcinkawalerowicz  Book: www.amazon.com/dp/1935182552

References

Related documents

Our main strategy is similar in spirit to a differences-in-differences (DD) strategy where we compare the outcomes of villages that have had their first election to villages in the

KRAUSS Lawrence M., Case Western Reserve University, Cleveland, Ohio, USA KRAWIEC Adam, Marc Kac Complex Systems Research Center, Krakow, Poland KUSENKO Alexander, UCLA, Dept

Vryghem ICRS in KC ESCRS Vienna

vertices of the standard lattice tiling; if we choose the point set data as the vertices or the symmetry centres, both cases will give us Delone set as a stan- dard lattice

Recently, Levine [9] expressed the vertex weighted complexity on spanning trees (with a fixed root) of the directed line graph of a digraph D in terms of the edge weighted complexity

successful Whitney Counterweight, an artist-initiated museum-scale event held in dialogue with the Whimey Biennial. Of his cover painting he says: "The water color is meant

NXTDIGITAL Limited, India’s leading integrated digital platforms company and the media vertical of the global Hinduja Group today announced the induction of Vynsley Fernandes on to

While existing ap- proaches obfuscate graph data by adding or removing edges entirely, we propose using a finer-grained perturbation that adds or removes edges partially : this way