46
Continuous Integration at Wooga

Continuous Integration for iOS

Embed Size (px)

DESCRIPTION

In this talk at the iOS User Group Berlin, I show how we realize continuous integration for iOS at Wooga. It covers topics ranging from setup over configuration, testing to distribution. Watch the video here: http://www.youtube.com/watch?v=wUROfOiCNQw&feature=plcp

Citation preview

Page 1: Continuous Integration for iOS

Continuous Integration at Wooga

Page 2: Continuous Integration for iOS

I’m lazy!

Page 3: Continuous Integration for iOS

I hate repetitive work!

Page 4: Continuous Integration for iOS

I make mistakes!

Page 5: Continuous Integration for iOS

Deploying iPhone App?

Page 6: Continuous Integration for iOS
Page 7: Continuous Integration for iOS

Let someone else do it...

Page 8: Continuous Integration for iOS

Continuous Integration

Page 9: Continuous Integration for iOS

Continuous IntegrationAutomate the build

Build every commit

Make build self-testing

Everyone can see the results of the latest build

Page 10: Continuous Integration for iOS

Automate the build

Build every commit

Make build self-testing

Everyone can see the results of the latest build

Automate the build

Continuous Integration

Page 11: Continuous Integration for iOS
Page 12: Continuous Integration for iOS
Page 13: Continuous Integration for iOS

http://xcloud.me/

Page 14: Continuous Integration for iOS

http://jenkins-ci.org/

Page 15: Continuous Integration for iOS

Automate the build

Build every commit

Make build self-testing

Everyone can see the results of the latest build

Build every commit

Page 16: Continuous Integration for iOS
Page 17: Continuous Integration for iOS
Page 18: Continuous Integration for iOS

Snapshot / Releaseon every commit

manually

Page 19: Continuous Integration for iOS

... requires di!erent bundle identifier ...

Page 20: Continuous Integration for iOS

PlistBuddy

$ /usr/libexec/PlistBuddy \-c "Set :CFBundleIdentifier net.wooga.XXX.snapshot"

$ /usr/libexec/PlistBuddy \-c "Set :CFBundleIdentifier net.wooga.XXX.release"

Page 21: Continuous Integration for iOS

... now we need individual certificates ...

Page 22: Continuous Integration for iOS

Configurations

Page 23: Continuous Integration for iOS

... update Jenkins ...

Page 24: Continuous Integration for iOS

Snapshot

Page 25: Continuous Integration for iOS

Automate the build

Build every commit

Make build self-testing

Everyone can see the results of the latest build

Make build self-testing

Page 26: Continuous Integration for iOS

$ xcodebuild \ -project ./Game/PocketUniverse.xcodeproj \ -target ***Tests \ -configuration Debug -sdk iphonesimulator \ | ./ocunit2junit.rb

Running Unit Tests

Page 27: Continuous Integration for iOS

$ xcodebuild \ -project ./Game/PocketUniverse.xcodeproj \ -target ***Tests \ -configuration Debug -sdk iphonesimulator \ | ./ocunit2junit.rb

Page 28: Continuous Integration for iOS
Page 29: Continuous Integration for iOS

https://github.com/MattesGroeger/OCUnit2JUnit

Testing with Kiwi

Page 30: Continuous Integration for iOS

Validation

$ /usr/bin/rake validate_config

Error: element decl. 'xpLevel', attribute 'type': The QName value 'xpLevelDefinition' does not resolve to a(n) type definition. at Schema.xsd:71.

Finished: FAILURE

Page 31: Continuous Integration for iOS

Automate the build

Build every commit

Make build self-testing

Everyone can see the results of the latest buildEveryone can see the results of the latest build

Page 32: Continuous Integration for iOS

www.hockeyapp.net

Over-The-Air Distribution

Live Crash Reports

Analytics

Page 33: Continuous Integration for iOS
Page 34: Continuous Integration for iOS

Upload new version

curl \ -F "status=2" \ -F "notify=0" \ -F "notes=New version!" \ -F "notes_type=0" \ -F "ipa=@XXX-InHouseSnapshot-${BUILD_NUMBER}.ipa" \ -F "[email protected]" \ -H "X-HockeyAppToken: ***" \ https://rink.hockeyapp.net/api/2/apps/***/app_versions

Page 35: Continuous Integration for iOS
Page 36: Continuous Integration for iOS
Page 37: Continuous Integration for iOS

Jenkins Remote Access API

Page 40: Continuous Integration for iOS
Page 41: Continuous Integration for iOS

Automate the build

Build every commit

Make build self-testing

Everyone can see the results of the latest build

Page 42: Continuous Integration for iOS

Now we have more time ...

Page 43: Continuous Integration for iOS
Page 44: Continuous Integration for iOS
Page 45: Continuous Integration for iOS

Section

Page 46: Continuous Integration for iOS

Questions?MattesGroegerjobs.wooga.com