Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Automate build and deployment for iOS and Android.

Automate build and deployment for iOS and Android.

A talk about CI and Bamboo on how we can automate processes while building apps for mobile .

I gave this talk to the "The Mobile Company" (http://themobilecompany.com/) developers on April 17th, 2014.

Javi Lorbada

April 17, 2014
Tweet

More Decks by Javi Lorbada

Other Decks in Technology

Transcript

  1. 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.
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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