1 of 23

Slide Notes

DownloadGo Live

Gitflow + CI

Published on Nov 18, 2015

CI, unit testing and deployment integration with Rundeck + Puppet.

PRESENTATION OUTLINE

Gitflow + CI

Integración al flujo de desarrollo
Photo by yukop

Agenda

  • Gitflow Workflow
  • jgitflow maven plugin
  • Gitlab CI
  • PARD + Rundeck
  • Roadmap

Branching model

  • Historical branches
  • Feature branches
  • Release branches
  • Hotfix branches
Photo by steveyb

jgitflow maven plugin

gitflow + maven
Photo by NatBat

Setup

  • parent-pom 1.0.11
  • Remover definiciones
  • [WIP] gulpfile.js

:feature-start

  • Al comenzar tarea
  • Branch de develop
  • Branch feature/*
  • git add / commit / push

:feature-finish

  • Luego de MR
  • mvn test install
  • Merge a develop
  • git push origin :feature/*
  • git fetch --all --prune

:hotfix-start

  • Ante arreglos simples
  • Branch de master -> hotfix/[tag]
  • Nueva versión minor
  • Actualiza versiones en pom.xml
  • Push hotfix branch
Photo by miki

:hotfix-finish

  • Nueva release rápida
  • Merge a master y develop
  • mvn install test
  • Nuevo [tag] -> push
  • git push origin :hotfix/*
  • git fetch --all --prune
Photo by avrene

:release-start

  • Ante nueva versión
  • Branch de develop -> release/[tag]
  • Versión SNAPSHOT -> nueva versión
  • Si existe [tag], falla
  • Actualiza poms
Photo by bdesham

:release-finish

  • mvn install test
  • Merge a master
  • Nueva versión SNAPSHOT en develop
  • Actualiza poms
  • git push origin :release/[tag]
  • git fetch --all --prune
  • Nuevo [tag] -> CI
Photo by phxcc

Gitlab CI

Integrando deploys y tests unitarios
Photo by A Mulligan

Integración Contínua

  • http://ci.contenta/
  • Push a repo dispara builds -> tests unitarios
  • .gitlab-ci.yml
  • Revisión frecuente íntegra

Entrega Contínua

  • Tests automatizados
  • mvn deploy a Nexus
  • Deployment manual a producción
  • Adaptado de CD

PARD + Rundeck

Deploy a producción

Puppet deploy (I)

Puppet deploy (II)

  • Tags disparan mvn deploy en CI
  • Artifact (.war/.zip) en Nexus
  • Rundeck permite seleccionarlos
  • Se ejecuta PARD + Puppet en cada nodo

PARD

  • Descarga de artifact
  • Checksum MD5 de descarga
  • Descompresión de .zip/.war
  • Smoke testing a /build/git/services o index.html
  • Automatizado con Rundeck
Photo by yukop

Roadmap

Resta por hacer
Photo by katerha

Terminar (I)

  • .gitlab-ci.yml y parent-pom en todos los proyectos
  • Configuración de aplicación externalizada
  • gulp-gitflow

Mejorar (II)

  • Perfiles en Puppet
  • Deploy automáticos para develop
  • Integrar con trello
  • Registro de deploys -> dashboard?
  • Alternativas: Docker, ElasticBox.

Eso es todo

Photo by erikaow