Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup -...

44
Versioning schemes, branching models Support your Continuous Delivery process Continuous Delivery meetup, 18-05-2016 Triple, Alkmaar Pavel Chunyayev

Transcript of Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup -...

Page 1: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

Versioning schemes, branching models

Support your Continuous Delivery processContinuous Delivery meetup, 18-05-2016

Triple, AlkmaarPavel Chunyayev

Page 2: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Amsterdam

Levi9 HQAmsterdam – 2005

25 people

Novi Sad

SerbiaNovi Sad – 2005

320+ people

Zrenjanin

SerbiaZrenjanin– 2014

30+ people

Iasi

RomaniaIasi – 200780+ people

Kiev

UkraineKiev – 2008130+ people

Page 3: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Electronic Retail

DigitalMarketing

Traffic and Transport

Software Services

Page 4: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Customer satisfaction 2015

• 4th year great results in Outsourcing Performance study

• 2015: 100% customer recommendation scoreExcellent trust score

Page 5: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

About me

• 12 years of IT experience• Lived and worked in Ukraine and Estonia • Moved a year and half ago to the Netherlands

• Love cycling• Learn Dutch

• Alpe d’HuZes - http://deelnemers.opgevenisgeenoptie.nl/levi9

Page 7: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Continuous Delivery

Incept

• Business idea• Is needed

immediately• Should be validated

Plan

• Refine• Estimate• Prioritize

Develop

• Put into sprint• Develop in a branch• Conduct a code

review• Merge into master

Build

• Trigger pipeline• Build• Unit testing• Integration testing• Static code analysis

Test

• Contract testing• E2E testing• Security testing• Resilience testing

Release

• Zero-downtime• Canary testing• Rolling deployment• Blue / green

deployment

Operate

• Monitoring• Validation of the

idea• Money generation• Disposal

Page 9: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Keep the product releasableBuild quality in

Page 10: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Build • Test • Release

Page 11: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Continuous Delivery

Incept

• Business idea• Is needed

immediately• Should be validated

Plan

• Refine• Estimate• Prioritize

Develop

• Put into sprint• Develop in a branch• Conduct a code

review• Merge into master

Build

• Trigger pipeline• Build• Unit testing• Integration testing• Static code analysis

Test

• Contract testing• E2E testing• Security testing• Resilience testing

Release

• Zero-downtime• Canary testing• Rolling deployment• Blue / green

deployment

Operate

• Monitoring• Validation of the

idea• Money generation• Disposal

Page 18: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Versioning models• Versioning SaaS vs installed applications• Releases, bugfixes and hotfixes

• Numeric• Date based• Semantic versioning• Marketing versions

Page 19: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Numeric• Major.Minor• Major.Minor.Patch• Major.Minor.Patch.Build• Major.Minor.Build• Major.Minor.Build.Revision• Major.Minor.Date

• 4.11, 5.2• 5.2.1, 9.3.2• 1.6.8.529• 1.6.529• 1.6.529.e91ba3• 1.6.150518

Page 20: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Major.Minor• -SNAPSHOT, -M1, -RC1, -RELEASE (.RELEASE) • 1.0-SNAPSHOT• 5.6-RC1• 2.5.0-M2• 5.2.1.RELEASE

Page 21: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

How to change version?• Software never reaching 1.0• Rapidly increasing version

Page 22: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Date based• Major.Minor.Date or just Date• 2.5.201505181• 0.2.2015051801• 1.7.20150518001• 1.0.201505181936• 3.1.20150518193956• 20150518194513• 2015.05.18-19.46.15

Page 23: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Semantic versioning• Major.minor.patch-prerelease+metadata• 0.1.4-b45+d2e760• 0.1.5-46• 0.2.0-150518• 0.2.1-prerelease+b538• 1.0.0-alpha• 1.3.9-beta• 2.0.0

Page 24: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Semantic versioning• Semver and continuous delivery• Assigning a version before release or after?• Enforcing the sequence of pull requests?• Not really needed for SaaS

• Build number is an abuse of semantic versioning

• Backwards compartible change or not?• Integrated application• Collection of applications

Page 25: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Marketing version• Whatever product management or marketing decide to call it• 2016 Early• 2016.5• Ultra, Turbo, Extra, VIP, Premium, Free

• How often to release and how often to increase the version number?

Page 26: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

How to generate and save version number• In the source code• External• Date• Build number• Source control

• Bump up the version• Before new feature or after new feature• Manually vs script while commiting (hooks)

Page 27: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

What to version?• Your product• Separate applications• Libraries, building blocks and tools • Public and private (internal versioning)

• Public (and private) API• DB schemas• Infrastructure configuration

Page 28: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Versioning things• Embedded (meta information) vs filename• Package the code and assign version to the packages• Dependency management• Latest• Ranges• Explicitly specified

Page 29: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Version of the product in microservices world?

Page 30: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Updating the contract

Page 31: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Updating the contract

Page 32: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Updating the contract

Page 33: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Updating the contract

Page 34: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Updating the contract

Page 36: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Models• SaaS vs installed

• Trunk-based• Feature driven • Release branches• Git flow• Open-source

Page 42: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Branching things• Tagging• Fork vs branching• Pull requests (merge requests)• Run tests• Code review

Page 43: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Continuous Delivery

Incept

• Business idea• Is needed

immediately• Should be validated

Plan

• Refine• Estimate• Prioritize

Develop

• Put into sprint• Develop in a branch• Conduct a code

review• Merge into master

Build

• Trigger pipeline• Build• Unit testing• Integration testing• Static code analysis

Test

• Contract testing• E2E testing• Security testing• Resilience testing

Release

• Zero-downtime• Canary testing• Rolling deployment• Blue / green

deployment

Operate

• Monitoring• Validation of the

idea• Money generation• Disposal

Keep the product releasableBuild quality in

Version everythingBranch out when needed

Page 44: Versioning schemes and branching models for Continuous Delivery - Continuous Delivery meetup - Alkmaar, 18-05-2016

@PavelChunyayev

Key takeaways• Focus on quality, speed will come• Quality has to be integral part of the process• Version each artifact uniquely • Select the branching model that supports

your product• Integrate frequently

Any questions?

[email protected]