Jazoon12 355 aleksandra_gavrilovska-1
-
Upload
netcetera -
Category
Technology
-
view
908 -
download
0
Transcript of Jazoon12 355 aleksandra_gavrilovska-1
![Page 1: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/1.jpg)
Continuous integration for iOS projects
Aleksandra Gavrilovska Netcetera 355
![Page 2: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/2.jpg)
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
![Page 3: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/3.jpg)
3
iOS App Distribution Process
![Page 4: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/4.jpg)
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
![Page 5: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/5.jpg)
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
![Page 6: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/6.jpg)
6
Configuring Jenkins Mac Slave
![Page 7: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/7.jpg)
7
Create New Job
> Properties that must be set
![Page 8: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/8.jpg)
8
Custom build system
> Implemented in Ruby > Rake wrapper around xcodebuild
– Rakefile – Several Ruby scripts – Included in our xCode project templates
![Page 9: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/9.jpg)
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!
![Page 10: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/10.jpg)
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
![Page 11: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/11.jpg)
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
![Page 12: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/12.jpg)
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!
![Page 13: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/13.jpg)
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
![Page 14: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/14.jpg)
14
Debugging: Symbolicate crash
> rake symbolicate REPORT=path_to_report!
– REPORT can be a path to directory > Extract the uuid from the crash report
> 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
lines = File.readlines(report).map {|line| line.tr("\r\n", '')}!!line = lines[lines.index("Binary Images:") + 1]!!line.match(/armv[67] +<[0-9a-z]+>/)[0].split(' ').map {|entry| entry.tr("<>", '')}!
![Page 15: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/15.jpg)
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
![Page 16: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/16.jpg)
16
Questions
![Page 17: Jazoon12 355 aleksandra_gavrilovska-1](https://reader033.fdocuments.net/reader033/viewer/2022060119/558e46a51a28ab56268b468c/html5/thumbnails/17.jpg)
Aleksandra Gavrilovska Netcetera [email protected]