Pretested Integration Plugin for Jenkins – Introduction – Phase 1: Learning Mercurial and Jenkins



Pretested Integration Plugin for Jenkins – Introduction – Phase 1: Learning Mercurial and Jenkins

0 0


presentation-pretested-integration-plugin-jciusrcph13-2013-09-06


On Github rlindsgaard / presentation-pretested-integration-plugin-jciusrcph13-2013-09-06

Pretested Integration Plugin for Jenkins

Ronni Elken Lindsgard & Alexander Winther Uldall

Table of Contents

Introduction Development process Plugin presentation Future work

Introduction

  • Us...
  • Project Course: Development Studio
  • Praqma
  • Continous Delivery
  • Pretested Integration

Branching approach: Personal branch

Branching approach: Fire and forget

Why pretested integration

Designing the plugin: The long and winding road

Phase 1: Learning Mercurial and Jenkins

  • Sprint 2
  • Jenkins module and Java refreshing
  • Getting to know the Mercurial way of doing things

Buildphases

Phase 2: The first prototype

  • Sprint 3
  • Sunshine scenario prototype
  • Cloning approach

<Insert picture of "follow the commit"/roundtrip>

Phase 3: Working out the specifics

  • Sprint 5
  • Narrowing down scope
  • First public release
  • Coining "pretested integration"
  • Moving from cloning to branching approach
  • Limited by Mercurial Plugin dependency

Why pretested integration

Branching approach: Personal branch

Branching approach: Fire and forget

Phase 4: Refactoring and redesigning

  • After the course
  • Refactoring the plugin
  • Proper plugin extension
  • Release of stable version

The Pretested Integration Plugin

DEMO

Plugin design

  • Defines extension points for extendability
  • Integrate one commit at a time
  • Built-in Mercurial support
  • Invariant: All commits on the integration branch is verified

Pretested integration classes

The extension point API

  • nextCommit
  • prepareWorkspace
  • handlePostBuild
    • commit
    • rollback

Mercurial

  • Personal branch workflow
  • Named branches
  • Push at commit
  • Reset to latest successful build

Personal branch

Implementing interfaces

git clone https://github.com/rlindsgaard/interface-example Implement:
  • nextCommit
  • prepareWorkspace
  • commit
  • rollback
Give it back... ;)

The future

Todo:

  • Built-in Git support
  • Environment variables
  • Configurable reset
  • Simplifying interface implementation
  • Conditional integration
  • Configurable build success criteria

Improving the Mercurial plugin

  • Change mercurial plugin to:
    • Make it possible to pull specific branches/revsets
    • Pull all branches

Benefits of the fire and forget approach

  • Less configuration/cluttering of management
  • Deterministic playback
  • Improve the invariant
  • Better overview of integration

Questions....