Continuous integration
for
iOS projects
Aleksandra Gavrilovska
Netcetera
355
AGENDA

>  iOS App Distribution Process
>  Practices of Continuous Integration
>  Jenkins
   –  How to configure slave
   –  How to configure job
>  Build system at Netcetera
   –  Overview of rake tasks
   –  Benefits
   –  Improvements




                                         2
iOS App Distribution Process




                               3
Practices of Continuous Integration


>    Maintain a code repository
>    Automate the build
>    Make the build self-testing
>    Everyone commits to the baseline every day
>    Every commit (to baseline) should be built
>    Keep the build fast
>    Test in a clone of the production environment
>    Make it easy to get the latest deliverables
>    Everyone can see the results of the latest build
>    Automate deployment


                                                        4
overview

>    Open source continuous integration service provider
>    Runs in servlet container such as Apache Tomcat
>    iOS Projects MUST be build on Mac
>    Jenkins instances as slaves




                                                           5
Configuring Jenkins Mac Slave




                                6
Create New Job

>  Properties that must be set




                                 7
Custom build system


>  Implemented in Ruby
>  Rake wrapper around xcodebuild
   –  Rakefile
   –  Several Ruby scripts
   –  Included in our xCode project templates




                                                8
Rakefile

xcode_project :"___PROJECTNAME___" do!
  # The artifact_id is a alias for the main Xcode target!
  artifact_id           "___ARTIFACT_ID___”!
  project_id            "___PROJECT_ID___"!
  group_id              "___GROUP_ID___"!
  svn                   "___SVN___"!
!
  release_destination "http://buildfs.group.nca/dav/projects/___PROJECTNAME___/
release/"!
  snapshot_destination "http://buildfs.group.nca/dav/projects/___PROJECTNAME___/
snapshots/"!
!
  itunes_artwork "src/main/resources/iTunesArtwork”!
!
  adhoc_package "NetceteraAdhoc" do!
     identity "iPhone Distribution: Netcetera AG"!
     # by default the provisioning profile used will be src/packaging/
ADHOC_PACKAGE_NAME.mobileprovision!
     # you can override by using!
     # provisioning_profile "path to provisioning profile"!
  end!
end!

                                                                              9
Rake tasks
agavrilo-2:agavrilo$ rake –tasks!
rake build             # Invokes xcode build to compile the project!
rake ci                 # Invoked by the CI system!
rake clean              #   Cleans the project!
rake package            #   Creates the packages!
rake release            #   Performs a release!
rake release:rollback   #   [TBD]!
rake report             #   Reports to techISR.!
rake symbolicate        #   Symbolicates the crash report provided under the
   REPORT variable.!
rake test               # Invokes The tests!
rake uitest             # Run Cucumber features!
!
!
task "ci"     => "deliver-snapshot”!
task "deliver-snapshot" => "package” !
task "package" => ["appstore-package", "adhoc-packages"]!
!
!                                                                              10
Test execution

>  rake test!
>  GHUnit as testing framework
>  Jenkins can run GHUnit tests
     –    http://gabriel.github.com/gh-unit/docs/appledoc_include/guide_ci.html!
>    UnitTest target should Run Script
>    Tests are executed on Simulator
>    JUnit test result report is created (XML file)
>    Reports to internal reporting tool




                                                                                   11
Packaging


>    rake package!
>    ‘Release’ configuration must exist in project scheme!
>    Creates app store package
>    .dSYM file is stored
>    Creates adhoc packages by resigning the app store packages
     –  Decreases the build time
     –  App store and adhoc application are both identical!




                                                                  12
Deployment


>  rake delivery!
>  Deploys all artifacts to snapshot_destination!
   –  All provisioning profiles
   –  App store build
   –  .dSYM package
   –  *.ipa packages
>  Ready to be fetched for testing or submission in iTunes Connect




                                                                     13
Debugging: Symbolicate crash


 >  rake symbolicate REPORT=path_to_report!
    –  REPORT can be a path to directory
 >  Extract the uuid from the crash report
lines = File.readlines(report).map {|line| line.tr("rn", '')}!
!
line = lines[lines.index("Binary Images:") + 1]!
!
line.match(/armv[67] +<[0-9a-z]+>/)[0].split(' ').map {|entry| entry.tr("<>", '')}!

 >  find the appropriate (matching) build on the DAV server
 "No snapshot can be found that matches uuid: #{uuid}, for
    architecture: #{arch}”!
 >  download it
 >  unpack it
 >  symbolicate it
                                                                              14
Conclusion


>  Benefits
   –  Not dependent on xCode version
   –  Control of the build process
   –  Control of the project state
   –  Applications are always ready to be tested
   –  Debugging
   –  Scalable and configurable build system
       • build of workspace
       • Installation of pods



>  Improvements
   –  Installation of certificates in keychain
   –  Check for code duplicates
   –  Check style
                                                   15
Questions




            16
Aleksandra Gavrilovska
Netcetera


aleksandra.gavrilovska@netcetera.com

More Related Content

PPT
Continuos integration for iOS projects
PDF
HotPush with Ionic 2 and CodePush
PDF
Welcome to Jenkins
PDF
Ansible introduction - XX Betabeers Galicia
PDF
Fastlane - Automation and Continuous Delivery for iOS Apps
PPTX
DevOps, A brief introduction to Vagrant & Ansible
PDF
CIbox - OpenSource solution for making your #devops better
PDF
Live deployment, ci, drupal
Continuos integration for iOS projects
HotPush with Ionic 2 and CodePush
Welcome to Jenkins
Ansible introduction - XX Betabeers Galicia
Fastlane - Automation and Continuous Delivery for iOS Apps
DevOps, A brief introduction to Vagrant & Ansible
CIbox - OpenSource solution for making your #devops better
Live deployment, ci, drupal

What's hot (20)

PDF
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
PDF
Deploy your app with one Slack command
PPTX
Vagrant to-aws-flow
PDF
"I have a framework idea" - Repeat less, share more.
PPTX
Deployment Patterns in the Ruby on Rails World
PPTX
Jenkins, pipeline and docker
PDF
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
PDF
Dockerize node.js application
PDF
Drupal 8 DevOps . Profile and SQL flows.
PDF
Ci system part i
PDF
Drupal contrib module maintaining
PPTX
Learning Maven by Example
PPTX
Jenkins CI presentation
PDF
DrupalCon Los Angeles - Continuous Integration Toolbox
PDF
Modern Infrastructure from Scratch with Puppet
PPTX
Jenkins days workshop pipelines - Eric Long
ODP
Chef training Day5
PPTX
Configuration Management in a Containerized World
PDF
Docker and Puppet for Continuous Integration
ODP
Chef training - Day3
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Deploy your app with one Slack command
Vagrant to-aws-flow
"I have a framework idea" - Repeat less, share more.
Deployment Patterns in the Ruby on Rails World
Jenkins, pipeline and docker
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
Dockerize node.js application
Drupal 8 DevOps . Profile and SQL flows.
Ci system part i
Drupal contrib module maintaining
Learning Maven by Example
Jenkins CI presentation
DrupalCon Los Angeles - Continuous Integration Toolbox
Modern Infrastructure from Scratch with Puppet
Jenkins days workshop pipelines - Eric Long
Chef training Day5
Configuration Management in a Containerized World
Docker and Puppet for Continuous Integration
Chef training - Day3
Ad

Viewers also liked (7)

PPT
Presentación: Martín Olmi-Analoga_eCommerce Day Montevideo 2013
PPTX
Canterbury Software Summit 2013 - Chairman's opening remarks
PPT
550week3 simon
PPT
Proven Steps To a New Habit
PPTX
Sociale media voor fotografen: 4 basics en 10 quickwins
PDF
Troubled E Press Kit
PPT
Ftl 103 tourette
Presentación: Martín Olmi-Analoga_eCommerce Day Montevideo 2013
Canterbury Software Summit 2013 - Chairman's opening remarks
550week3 simon
Proven Steps To a New Habit
Sociale media voor fotografen: 4 basics en 10 quickwins
Troubled E Press Kit
Ftl 103 tourette
Ad

Similar to Jazoon12 355 aleksandra_gavrilovska-1 (20)

PDF
Intro to Continuous Integration at SoundCloud
PDF
Ci for i-os-codemash-01.2013
PDF
Continuous Integration for IOS Apps
PDF
Automate your iOS deployment a bit
PPTX
Jenkins CI/CD setup for iOS in Mac OSX
PDF
Mac ruby deployment
PDF
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
PDF
Xcode, Basics and Beyond
PPTX
Continuous integration by Rémy Virin
PDF
Continuous Integration for iOS
PDF
Continuous Integration for iOS (iOS User Group Berlin)
PDF
How we integrate & deploy Mobile Apps with Travis CI
PDF
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
PPTX
Basic iOS Training with SWIFT - Part 4
KEY
Continuous integration & deployment
KEY
Developing iOS apps on your iPad with XCAB
PDF
Mastering the Project File (AltConf)
PDF
Taming iOS Testing at Square -- JUC West 2015
KEY
Ruby'izing iOS development
KEY
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...
Intro to Continuous Integration at SoundCloud
Ci for i-os-codemash-01.2013
Continuous Integration for IOS Apps
Automate your iOS deployment a bit
Jenkins CI/CD setup for iOS in Mac OSX
Mac ruby deployment
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
Xcode, Basics and Beyond
Continuous integration by Rémy Virin
Continuous Integration for iOS
Continuous Integration for iOS (iOS User Group Berlin)
How we integrate & deploy Mobile Apps with Travis CI
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
Basic iOS Training with SWIFT - Part 4
Continuous integration & deployment
Developing iOS apps on your iPad with XCAB
Mastering the Project File (AltConf)
Taming iOS Testing at Square -- JUC West 2015
Ruby'izing iOS development
iOSDevCamp 2011 - Getting "Test"-y: Test Driven Development & Automated Deplo...

More from Netcetera (20)

PDF
Payment trend scouting - Kurt Schmid, Netcetera
PDF
Boost your approved transaction volume - Ana Vuksanovikj Vaneska, Netcetera
PDF
Increase conversion, convenience and security in e-commerce checkouts - Silke...
PDF
3-D Secure 2.0 - Stephan Rüdisüli, Netcetera & Patrick Juffern, INFORM
PDF
Digital Payment in 2020 - Kurt Schmid, Netcetera
PDF
AI First. Erfolgsfaktoren für künstliche Intelligenz im Unternehmen
PPTX
Augmenting Maintenance
PDF
Front-end up front
PDF
The future of Prototpying
PDF
EMV Secure Remote Commerce (SRC)
PPTX
Online shopping technology in the fast lane?
PDF
Merchant tokenization and EMV® Secure Remote Commerce
PDF
Seamless 3-D Secure e-commerce experience
PPTX
Augmenting Health Care
PDF
Driving transactional growth with 3-D Secure
PDF
Digital Payment Quo Vadis
PDF
EMV® Secure Remote Commerce
PDF
Context: The missing ingredient in multilingual software translation
PDF
Digital Payments - Netcetera Innovation Summit 2018
PDF
"Whats up and new at Netcetera?" - Netcetera Innovation Summit 2018
Payment trend scouting - Kurt Schmid, Netcetera
Boost your approved transaction volume - Ana Vuksanovikj Vaneska, Netcetera
Increase conversion, convenience and security in e-commerce checkouts - Silke...
3-D Secure 2.0 - Stephan Rüdisüli, Netcetera & Patrick Juffern, INFORM
Digital Payment in 2020 - Kurt Schmid, Netcetera
AI First. Erfolgsfaktoren für künstliche Intelligenz im Unternehmen
Augmenting Maintenance
Front-end up front
The future of Prototpying
EMV Secure Remote Commerce (SRC)
Online shopping technology in the fast lane?
Merchant tokenization and EMV® Secure Remote Commerce
Seamless 3-D Secure e-commerce experience
Augmenting Health Care
Driving transactional growth with 3-D Secure
Digital Payment Quo Vadis
EMV® Secure Remote Commerce
Context: The missing ingredient in multilingual software translation
Digital Payments - Netcetera Innovation Summit 2018
"Whats up and new at Netcetera?" - Netcetera Innovation Summit 2018

Recently uploaded (20)

PDF
LMS bot: enhanced learning management systems for improved student learning e...
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PPTX
Module 1 Introduction to Web Programming .pptx
LMS bot: enhanced learning management systems for improved student learning e...
SGT Report The Beast Plan and Cyberphysical Systems of Control
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
A symptom-driven medical diagnosis support model based on machine learning te...
4 layer Arch & Reference Arch of IoT.pdf
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Auditboard EB SOX Playbook 2023 edition.
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
MuleSoft-Compete-Deck for midddleware integrations
Early detection and classification of bone marrow changes in lumbar vertebrae...
giants, standing on the shoulders of - by Daniel Stenberg
Build automations faster and more reliably with UiPath ScreenPlay
CEH Module 2 Footprinting CEH V13, concepts
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Build Real-Time ML Apps with Python, Feast & NoSQL
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Module 1 Introduction to Web Programming .pptx

Jazoon12 355 aleksandra_gavrilovska-1

  • 2. AGENDA >  iOS App Distribution Process >  Practices of Continuous Integration >  Jenkins –  How to configure slave –  How to configure job >  Build system at Netcetera –  Overview of rake tasks –  Benefits –  Improvements 2
  • 4. Practices of Continuous Integration >  Maintain a code repository >  Automate the build >  Make the build self-testing >  Everyone commits to the baseline every day >  Every commit (to baseline) should be built >  Keep the build fast >  Test in a clone of the production environment >  Make it easy to get the latest deliverables >  Everyone can see the results of the latest build >  Automate deployment 4
  • 5. overview >  Open source continuous integration service provider >  Runs in servlet container such as Apache Tomcat >  iOS Projects MUST be build on Mac >  Jenkins instances as slaves 5
  • 7. Create New Job >  Properties that must be set 7
  • 8. Custom build system >  Implemented in Ruby >  Rake wrapper around xcodebuild –  Rakefile –  Several Ruby scripts –  Included in our xCode project templates 8
  • 9. Rakefile xcode_project :"___PROJECTNAME___" do! # The artifact_id is a alias for the main Xcode target! artifact_id "___ARTIFACT_ID___”! project_id "___PROJECT_ID___"! group_id "___GROUP_ID___"! svn "___SVN___"! ! release_destination "http://buildfs.group.nca/dav/projects/___PROJECTNAME___/ release/"! snapshot_destination "http://buildfs.group.nca/dav/projects/___PROJECTNAME___/ snapshots/"! ! itunes_artwork "src/main/resources/iTunesArtwork”! ! adhoc_package "NetceteraAdhoc" do! identity "iPhone Distribution: Netcetera AG"! # by default the provisioning profile used will be src/packaging/ ADHOC_PACKAGE_NAME.mobileprovision! # you can override by using! # provisioning_profile "path to provisioning profile"! end! end! 9
  • 10. Rake tasks agavrilo-2:agavrilo$ rake –tasks! rake build # Invokes xcode build to compile the project! rake ci # Invoked by the CI system! rake clean # Cleans the project! rake package # Creates the packages! rake release # Performs a release! rake release:rollback # [TBD]! rake report # Reports to techISR.! rake symbolicate # Symbolicates the crash report provided under the REPORT variable.! rake test # Invokes The tests! rake uitest # Run Cucumber features! ! ! task "ci" => "deliver-snapshot”! task "deliver-snapshot" => "package” ! task "package" => ["appstore-package", "adhoc-packages"]! ! ! 10
  • 11. Test execution >  rake test! >  GHUnit as testing framework >  Jenkins can run GHUnit tests –  http://gabriel.github.com/gh-unit/docs/appledoc_include/guide_ci.html! >  UnitTest target should Run Script >  Tests are executed on Simulator >  JUnit test result report is created (XML file) >  Reports to internal reporting tool 11
  • 12. Packaging >  rake package! >  ‘Release’ configuration must exist in project scheme! >  Creates app store package >  .dSYM file is stored >  Creates adhoc packages by resigning the app store packages –  Decreases the build time –  App store and adhoc application are both identical! 12
  • 13. Deployment >  rake delivery! >  Deploys all artifacts to snapshot_destination! –  All provisioning profiles –  App store build –  .dSYM package –  *.ipa packages >  Ready to be fetched for testing or submission in iTunes Connect 13
  • 14. Debugging: Symbolicate crash >  rake symbolicate REPORT=path_to_report! –  REPORT can be a path to directory >  Extract the uuid from the crash report lines = File.readlines(report).map {|line| line.tr("rn", '')}! ! line = lines[lines.index("Binary Images:") + 1]! ! line.match(/armv[67] +<[0-9a-z]+>/)[0].split(' ').map {|entry| entry.tr("<>", '')}! >  find the appropriate (matching) build on the DAV server "No snapshot can be found that matches uuid: #{uuid}, for architecture: #{arch}”! >  download it >  unpack it >  symbolicate it 14
  • 15. Conclusion >  Benefits –  Not dependent on xCode version –  Control of the build process –  Control of the project state –  Applications are always ready to be tested –  Debugging –  Scalable and configurable build system • build of workspace • Installation of pods >  Improvements –  Installation of certificates in keychain –  Check for code duplicates –  Check style 15
  • 16. Questions 16