@michaelkotten @_openknowledge #WISSENTEILEN
Michael Kotten (a.k.a. @michaelkotten)
ÜBER MICH
MK
#WISSENTEILEN
• Head of mobile development
• Enterprise & Mobile
• Developer & Speaker
• IOT Fan
• zweifacher Vater, einfacher Ehemann
Branchenneutrale Softwareentwicklung und IT-Beratung
ÜBER OPEN KNOWLEDGE
#WISSENTEILEN
#WISSENTEILEN
Continuous
What ?!?!
Continuous Delivery
#WISSENTEILEN
Continuous delivery (CD) is a software engineering approach in which
teams produce software in short cycles, ensuring that the software can be
reliably released at any time.
(wikipedia.org)
Continuous Delivery
#WISSENTEILEN
Develop
Build
TestDeploy
Release
Was ist Continuous Delivery?
#WISSENTEILEN
• Einstellungssache
• kurze Release Zyklen
• schnelles Feedback
• jeder Build ist ein potentielles Release
• manuelles Eingreifen minimieren
• hoher Automatisierungsgrad
• Ausreichende Testabdeckung
? Definition
#WISSENTEILEN
Aber wie?
#WISSENTEILEN
Basics
#WISSENTEILEN
Gitflow
#WISSENTEILEN
Gitflow
#WISSENTEILEN
Gitflow
#WISSENTEILEN
Gitflow
#WISSENTEILEN
Continuous Integration
Continuous Integration
#WISSENTEILEN
Develop
Build
TestDeploy
Release
Continuous Integration
#WISSENTEILEN
Develop
Build
TestDeploy
Release
#WISSENTEILEN
Continuous Integration
#WISSENTEILEN
„Continuous Integration is a software development practice where
members of a team integrate their work frequently, usually each person
integrates at least daily - leading to multiple integrations per day.
Each integration is verified by an automated build (including test) to detect
integration errors as quickly as possible.“
(Martin Fowler)
#WISSENTEILEN
Workflow
Continuous Integration
Benefit
#WISSENTEILEN
Reduziert Risiken
• Fehler werden schneller erkannt und behoben
• Bessere Planbarkeit
Continuous Integration
Benefit
#WISSENTEILEN
Häufige und kurze Integrationsphasen ersetzen
seltene und lange Phasen
• Releases sind jederzeit möglich
• Projektstatus ist jederzeit transparent für das
ganze Team
Continuous Integration
Benefit
#WISSENTEILEN
Reduziert manuellen Testaufwand
(Regressionstests)
• Spart Zeit, Geld und Nerven
• Tests laufen jedes Mal gleich
• Tests laufen häufiger
• Team kann sich sinnvolleren Aufgaben
widmen
Continuous Integration
Benefit
#WISSENTEILEN
Sichtbare und messbare Code Qualität
• Build Status jederzeit sichtbar
• Aktuelle Qualitätsmetriken
• Qualitätsmetriken über Zeitraum
Continuous Integration
Benefit
#WISSENTEILEN
Vertrauen in das Produkt steigt
• Sicherheit bei jeder Code Änderung
• Keine Seiteneffekte
Continuous Integration
Warum nicht?
#WISSENTEILEN
• Mehraufwand für Pflege des CI Systems
Continuous Integration
Warum nicht?
#WISSENTEILEN
• Mehraufwand für Pflege des CI Systems
Continuous Integration
Warum nicht?
#WISSENTEILEN
• Mehraufwand für Pflege des CI Systems
• Zu viel Veränderung
Continuous Integration
Warum nicht?
#WISSENTEILEN
• Mehraufwand für Pflege des CI Systems
• Zu viel Veränderung
Continuous Integration
Warum nicht?
#WISSENTEILEN
• Mehraufwand für Pflege des CI Systems
• Zu viel Veränderung
• Zu viele Builds schlagen fehl
Continuous Integration
Warum nicht?
#WISSENTEILEN
• Mehraufwand für Pflege des CI Systems
• Zu viel Veränderung
• Zu viele Builds schlagen fehl
Continuous Integration
Wie?
• Automatisierung
schrittweise erweitern
• Team langsam
heranführen
• Vertrauen aufbauen
#WISSENTEILEN
Continuous Deployment
#WISSENTEILEN
Develop
Build
TestDeploy
Release
Continuous Deployment
#WISSENTEILEN
Develop
Build
TestDeploy
Release
#WISSENTEILEN
Fastlane
#WISSENTEILEN
fastlane is the tool to release your iOS and Android app 🚀
It handles all tedious tasks, like generating screenshots, dealing with code
signing, and releasing your application.
(https://fastlane.tools)
#WISSENTEILEN
fastlane
#WISSENTEILEN
• Wrapper für xcodebuild
• Formatiert Output per xcpretty
• HTML, json und JUnit reports
fastlane
#WISSENTEILEN
• Bis zu 20 (Sprachen) x 6 (Geräte) x 5
(Screenhots) = 600 Screenshots
• Automatische Erzeugung während UI Tests
• Immer die gleichen Screenshots
fastlane
#WISSENTEILEN
• Verwaltung von Provisioning Profiles
• Create, Renew, Repair
• App Store, Ad Hoc und Development Profiles
fastlane
#WISSENTEILEN
• Erzeugt fertige Archive (*.ipa)
fastlane
#WISSENTEILEN
• Upload von Screenshots, Metadaten und
Binaries zu iTunes Connect
• App Store Review
• Metadaten in Source Control
fastlane
#WISSENTEILEN
• Upload zu Testflight
• Tester verwalten (per csv)
fastlane
Fastfile
#WISSENTEILEN
• Beschreibung der Deployment Pipeline
• Pipeline as Code
• Eigene DSL
lane :beta do
increment_build_number
gym # Build your app
testflight # Upload to TestFlight
end
lane :appstore do
snapshot # Generate screenshots for the App Store
gym # Build your app
deliver # Upload the screenshots and the binary to iTunes
slack # Let your team-mates know the new version is live
end
#WISSENTEILEN
#WISSENTEILEN
Howto
#WISSENTEILEN
Delivery Pipeline
#WISSENTEILEN
Delivery Pipeline
Continuous Delivery
Delivery Pipeline
#WISSENTEILEN
Pipeline Plugin (a.k.a Workflow Plugin)
• Pipeline as Code
• Jenkinsfile
• Pipeline Beschreibung
• Groovy
• Commit to SCM
• Automatische Konfiguration in Jenkins
Continuous Delivery
Pipeline Plugin
#WISSENTEILEN
• Can support complex, real-world, CD Pipeline
requirements: pipelines can fork/join, loop, parallel, to
name a few
• Is Resilient: pipeline executions can survive master restarts
• Is Pausable: pipelines can pause and wait for human
input/approval
• Is Efficient: pipelines can restart from saved checkpoints
• Is Visualized: Pipeline StageView provides status at-a-
glance dashboards including trending
#WISSENTEILEN
Jenkinsfile
node {
stage 'Checkout and Setup'
deleteDir()
checkout scm
stage 'Lint'
sh 'fastlane lint'
stage 'Test'
sh 'fastlane test'
stage 'Build'
def build_number = env.BUILD_NUMBER
sh "fastlane build build_number:${build_number}"
stage 'Deploy'
archive 'reports/, dist/'
sh 'fastlane deploy'
}
Continuous Delivery
Delivery Pipeline
#WISSENTEILEN
Multibranch Pipeline
• „Ordner“ für mehrere Pipeline Jobs
• Jeder Branch mit Jenkinsfile wird automatisch
zum Pipeline Job
• Projekte nie mehr manuell anlegen
• Jenkinsfile im branch editieren
#WISSENTEILEN
#WISSENTEILEN
Continuous Delivery
#WISSENTEILEN
DEMO
FRAGEN
? ? ?
#WISSENTEILEN
Michael Kotten
Head of mobile development
michael.kotten@openknowledge.de
@michaelkotten
+49 (0)441 4082 – 0
OFFENKUNDIGGUT
KONTAKT
#WISSENTEILEN
Icons in this presentation designed by “Freepik”, “Nice and
Serious” and “Elegant Themes” from www.flaticon.com
• [1] Rainer Sturm / pixelio.de
• [45] Erwin Lorenzen / pixelio.de
BILDNACHWEISE
#WISSENTEILEN

App-Delivery-Pipeline