Date post: | 21-Mar-2017 |
Category: |
Software |
Upload: | open-knowledge-gmbh |
View: | 108 times |
Download: | 0 times |
Michael Kotten (a.k.a. @michaelkotten)
ÜBER MICH
MK
#WISSENTEILEN
• Head of mobile development• Enterprise & Mobile • Developer & Speaker
• IOT Fan• zweifacher Vater, einfacher Ehemann
Continuous Delivery
#WISSENTEILEN
Continuous delivery (CD) is a software engineering approach in whichteams produce software in short cycles, ensuring that the software can bereliably released at any time.
(wikipedia.org)
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
Continuous Integration
#WISSENTEILEN
„Continuous Integration is a software development practice wheremembers of a team integrate their work frequently, usually each personintegrates at least daily - leading to multiple integrations per day.Each integration is verified by an automated build (including test) to detectintegration errors as quickly as possible.“
(Martin Fowler)
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• 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
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)
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
• Upload von Screenshots, Metadaten und Binaries zu iTunes Connect
• App Store Review• Metadaten in Source Control
fastlane
Fastfile
#WISSENTEILEN
• Beschreibung der Deployment Pipeline• Pipeline as Code• Eigene DSL
lane :beta doincrement_build_numbergym # Build your apptestflight # Upload to TestFlight
endlane :appstore dosnapshot # Generate screenshots for the App Storegym # Build your appdeliver # Upload the screenshots and the binary to iTunesslack # Let your team-mates know the new version is live
end
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, toname 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_NUMBERsh "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
Michael KottenHead of mobile development
[email protected]@michaelkotten+49 (0)441 4082 – 0
OFFENKUNDIGGUT
KONTAKT
#WISSENTEILEN