1, 2, 3 build - continuous integration für mobile apps

25
© Zühlke 2017 1, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 1 1, 2, 3 - Build! Continuous Integration für Mobile Apps @PachaAlexand er

Upload: alexander-pacha

Post on 26-Jan-2017

63 views

Category:

Software


0 download

TRANSCRIPT

Page 1: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 1

1, 2, 3 - Build!Continuous Integration für Mobile

Apps@PachaAlexander

Page 2: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 2

MotivationJenkins aufsetzen (Oh nein… nicht schon wieder!)

Page 3: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 3

“Zivilisationen entwickeln sich weiter, indem sie die Anzahl der wichtigen Operationen erhöhen, die sie durchführen können ohne zu denken.“ (Sinngemäß aus dem Englischen)

Alfred North Whitehead

Page 4: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 4

Kurze Umfrage

Was wird entwickelt?Versionskontrollsysteme?

Delivery Methode?CI Tools?

Page 5: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 5

Continuous Integration

Quelle: https://insights.sei.cmu.edu/devops/2015/01/continuous-integration-in-devops-1.html

Page 6: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 6

1Automatisierter Build

Page 7: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 7

Der Build-Prozess

Repository Bekannte Buildumgebung Deliverable

Page 8: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 8

Bekannte Buildumgebung

iOS-Apps benötigen Mac

Projektabhängig

UWP-Apps benötigen Windows

Android Apps sind plattformunabhängig

Page 9: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 9

Live-Demo

GreenhouseCIAutomatisierten Buildprozess aufsetzen

Page 10: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 10

Automatische Versionierung

https://gist.github.com/apacha

CI sollte Versionsnummer automatisch vergeben

Page 11: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 11

Apps signieren

AndroidKeystores (selbstgeneriert)Debug vs. Release Keystore

Weitere Informationen:• https://developer.android.com/studio/publish/app-signing.htm

l

• https://codesigning.guide/ • http://sharpmobilecode.com/making-sense-of-ios-provisioning

/

iOSIdentity Certificates und

Provisioning ProfilesDedizierte Testgeräte

Page 12: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 12

2Automatisierte Tests

Page 13: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 13

“Teste früh. Teste oft. Teste automatisiert”

Hunt and Thomas – The Pragmatic Programmer

Page 14: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 14

Automatisierte Unit-TestsLeicht umsetzbar auf allen Plattformen

Live-Demo

Page 15: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 15

Automatisierte UI-Tests

• GreenhouseCI, Bitrise und Travis unterstützen Android Emulator und iOS Simulator direkt

• VSTS benötigt Agent: https://github.com/Microsoft/vsts-agent

• On-Devices Services• Testdroid• Firebase• Xamarin Test Cloud• AWS Device Farm• Testobject

Testen auf virtuellen und physischen Geräten

Page 16: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 16

Automatisierte UI-TestsFirebase

Page 17: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 17

Automatisierte UI-Tests

Live-Demo

Page 18: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 18

“Teste deine Software, oder deine Anwender tun es”

Hunt and Thomas – The Pragmatic Programmer

Page 19: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 19

3Automatisches Deployment

Page 20: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 20

Automatisches DeploymentDeployment für Google Play Store

Page 21: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 21

Automatisches DeploymentDeployment für Apple App Store

Page 22: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 22

Automatisches DeploymentDeployment für Apple App Store mit Fastlane

Page 23: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 23

Deployment an (Beta-)Tester

Direktes Deployment der App an TesterVerfügbar für alle Plattformen

Weitere Features: • Statistiken• Melden von Abstürzen (inkl. Stack-Trace)• Feedback• Automatische Aktualisierung (side-loading)

HockeyApp

Page 24: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 24

Weitere Tools und Ressourcen

• Fabric Crashlytics • Testflight BetaTesting für iOS• Google Firebase

Weitere Links auf http://my-it.at

Page 25: 1, 2, 3   build - continuous integration für mobile apps

© Zühlke 20171, 2, 3 - Build! | Alexander Pacha 18. Januar 2017 Folie 25

Zusammenfassung

• Continuous Integration und Continuous Delivery ist auch für mobile Applikationen möglich und sinnvoll

• Aufsetzen manchmal knifflig, aber den Aufwand wert• Onlinedienste oft kostenpflichtig, aber helfen besonders

am Anfang sehr• Jeder Dev kann leicht DevOp werden