Slide 1

Slide 1 text

Javi Lorbada Automate build and deployment for iOS and Android

Slide 2

Slide 2 text

Javi Lorbada Automate build and deployment for iOS Why? The Mobile Company has over 40 apps in the Store, both platforms Apple App Store and Google Play Store. • Timely release of new features. • Bug fixes. • New apps.

Slide 3

Slide 3 text

Javi Lorbada Why we should automate… 1. Minimize environment issues. 2. Send builds to testers / customers. 3. Stay focused on development. 4. Avoid certificates / provisioning headaches. 5. Code stability. 6. No more messy, unpredictable deploys. 7. Save time on repetitive tasks. 8. Continuous Integration? Automate build and deployment for iOS

Slide 4

Slide 4 text

Javi Lorbada Automate build and deployment for iOS How? iOS Testing: • xcodebuild test via Make • Generates JUnit.xml with xcpretty • Bamboo parses the XML and present it with a nice interface

Slide 5

Slide 5 text

Javi Lorbada Automate build and deployment for iOS Building: • xcodebuild using shenzhen. xcodebuild -workspace {projectName}.xcworkspace -scheme {projectName} -sdk iphonesimulator clean ** CLEAN SUCCEEDED ** ipa build --scheme WebTV xcodebuild {projectName}.xcworkspace xcrun PackageApplication zip /Users/admin/bamboo-agent-home/xml-data/build-dir/{projectName}-BUILD/{projectName}.app.dSYM /Users/admin/bamboo-agent-home/xml-data/build-dir/{projectName}-BUILD/{projectName}.ipa successfully built • Once the IPA is generated, Bamboo will share with the next stage in order to deploy it. How? iOS

Slide 6

Slide 6 text

Javi Lorbada Automate build and deployment for iOS Distribution: • Deploy to HockeyApp using shenzhen. ipa distribute:hockeyapp --token {token} -m “{Release notes}” Build successfully uploaded to HockeyApp • When the operation succeeds we’ll be able to see a new version within HockeyApp, ready to send to the testers / customer. How? iOS

Slide 7

Slide 7 text

Javi Lorbada Automate build and deployment for iOS Building: • gradle via gradle wrapper :{projectName}:compileDebugNdk :{projectName}:preBuild :{projectName}:preDebugBuild … BUILD SUCCESSFUL • Once the project has been built successfully we’ll proceed to deploy the .apk file to Hockey. How? Android

Slide 8

Slide 8 text

Javi Lorbada Automate build and deployment for iOS Distribution: • To HockeyApp via gradle wrapper, using gradle-hockeyapp- plugin :{projectName}:uploaddebugToHockeyApp App file: /Users/admin/bamboo-agent-home/xml-data/build-dir/{projectName}-DEPLOY/{projectName}/build/apk/ DeltaLloyd-debug-unaligned.apk Request: POST https://rink.hockeyapp.net/api/2/apps HTTP/1.1 BUILD SUCCESSFUL • When the operation succeeds we’ll be able to see a new version within HockeyApp, ready to send to the testers / customer. How? Android

Slide 9

Slide 9 text

Javi Lorbada Automate build and deployment for iOS How? Continuous Integration: 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. ! source: http://martinfowler.com/articles/continuousIntegration.html

Slide 10

Slide 10 text

Javi Lorbada Automate build and deployment for iOS Thank you!! Javi Lorbada [email protected] http://javilorbada.me/