Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automate the Mobile

Automate the Mobile

If you are starting serious with Mobile development for multiple platforms you need to have a plan! Let’s discuss what components you can set up in your Mobile DevOps landscape, how an application would travel from each state to another, and what do you need to do to setup it. In the talk we will talk about CI, automation testing, provisioning, automatic AppStore deployments, device labs and more.

Alexey Buzdin

July 16, 2016
Tweet

More Decks by Alexey Buzdin

Other Decks in Programming

Transcript

  1. Picture by
    Automate the Mobile
    @AlexeyBuzdin

    View full-size slide

  2. @AlexeyBuzdin
    Developer / Trainer at
    GDGRiga.lv RigaDevDay.lv

    View full-size slide

  3. Next 40 minutes of your time
    1. Landscape Overview
    2. Building Stuff
    3. Extra Spicy Recipes

    View full-size slide

  4. 1. Landscape Overview

    View full-size slide

  5. 1. Landscape Overview
    First-thing-first:
    We need a PC!

    View full-size slide

  6. 1. Landscape Overview
    And here is where the first problem appears…
    First-thing-first:
    We need a PC!

    View full-size slide

  7. How can this be a problem?

    View full-size slide

  8. needs a
    needs a

    View full-size slide

  9. needs a
    needs a
    only needs your

    View full-size slide

  10. The easiest
    solution:

    View full-size slide

  11. Ok…ok…just kidding :)
    2.
    1.

    View full-size slide

  12. Ok…ok…just kidding :)
    1.
    2.
    +

    View full-size slide

  13. Ok…ok…just kidding :)
    1.
    2.
    +
    + Build Server

    View full-size slide

  14. 1. Landscape Overview
    ->>
    Second:
    Version Control System

    View full-size slide

  15. 1. Landscape Overview
    Nothing to add here :)
    Second:
    Version Control System
    ->>

    View full-size slide

  16. 1. Landscape Overview
    Continuous Integration Tool
    <<-
    ->>

    View full-size slide

  17. https: //jenkins.io/

    View full-size slide

  18. https: //jenkins.io/
    https: // www.jetbrains.com/teamcity/

    View full-size slide

  19. https: //jenkins.io/
    https: // www.jetbrains.com/teamcity/
    https: // www.atlassian.com/software/bamboo

    View full-size slide

  20. https: //jenkins.io/
    https: // www.jetbrains.com/teamcity/
    https: // www.atlassian.com/software/bamboo
    https: //concourse.ci/

    View full-size slide

  21. Could be a thing for Product Companies

    View full-size slide

  22. 1. Landscape Overview
    Continuous Integration Tool
    <<-
    ->>

    View full-size slide

  23. 1. Landscape Overview
    Universal Artifact Repository
    <<-
    ->>
    <<-
    <<-

    View full-size slide

  24. ->>
    ->>
    ->>
    ->>
    ->>

    View full-size slide

  25. ->>
    ->>
    ->> https: //github.com/Carthage/Carthage
    https: //cocoapods.org/

    View full-size slide

  26. ->>
    ->>
    ->>
    ->>

    View full-size slide

  27. ->>
    ->>
    ->>
    ->>
    ->>

    View full-size slide

  28. Repository for Hundred Providers
    https: // www.jfrog.com/artifactory/

    View full-size slide

  29. Repository for Hundred Providers
    https: // www.jfrog.com/artifactory/

    View full-size slide

  30. DISTRIBUTION MADE EASY!
    Powering the Distribution of
    Supporting
    https: //bintray.com/

    View full-size slide

  31. allprojects {
    repositories {
    maven { url "https: //jitpack.io" }
    }
    }
    dependencies {
    compile 'com.github.User:Repo:Tag'
    }

    View full-size slide

  32. 1. Landscape Overview
    Universal Artifact Repository
    <<-
    ->>
    <<-
    <<-

    View full-size slide

  33. 1. Landscape Overview
    Mobile App Management
    <<-
    ->>
    <<-
    <<-
    <<-

    View full-size slide

  34. https: //github.com/sparcedge/knappsack

    View full-size slide

  35. https: //github.com/sparcedge/knappsack
    https: //github.com/wso2

    View full-size slide

  36. https: //github.com/sparcedge/knappsack
    https: // www.mobileiron.com/
    https: //github.com/wso2

    View full-size slide

  37. 1. Landscape Overview
    Mobile App Management
    <<-
    ->>
    <<-
    <<-
    <<-

    View full-size slide

  38. - Upload screenshots, metadata, apps to the App Store
    - Automate screenshots provisioning on different devices
    - Quickly put your screenshots into the right device frames
    - Automatically generate push notification profiles
    - Automatically maintain iOS code signing certificates
    https: //github.com/fastlane/fastlane

    View full-size slide

  39. 1. Landscape Overview
    Mobile App Management
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-

    View full-size slide

  40. https: // www.hockeyapp.net/

    View full-size slide

  41. 1. Landscape Overview
    Static Analysis
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-
    <<-
    <<-

    View full-size slide

  42. https: //github.com/SonarQubeCommunity/sonar-android
    https: //github.com/octo-technology/sonar-objective-c
    https: //github.com/Backelite/sonar-swift
    https: //github.com/SonarSource/sonar-csharp
    https: //github.com/SonarSource/sonar-javascript

    View full-size slide

  43. 1. Landscape Overview
    Static Analysis
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-
    <<-
    <<-

    View full-size slide

  44. 1. Landscape Overview
    Analytics
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-
    <<-
    <<-

    View full-size slide

  45. https://get.fabric.io/

    View full-size slide

  46. https://piwik.org/
    Self-hosted Web supported

    View full-size slide

  47. 1. Landscape Overview
    Analytics
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-
    <<-
    <<-

    View full-size slide

  48. 1. Landscape Overview
    Summary
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-
    <<-
    <<-

    View full-size slide

  49. Developer must be able to build an app from scratch on an
    empty environment with a single console command
    Big Good Rule
    of Goodness
    1.

    View full-size slide

  50. ->>
    ->>
    ->>
    ->>
    2. Building Stuff

    View full-size slide

  51. One Gradle to Rule them
    All!

    View full-size slide

  52. https://github.com/ctco/gradle-mobile-plugin

    View full-size slide

  53. Big Good Rule
    of Goodness
    1. ctcoMobile {
    2. platform = 'xcode'
    3. xcode {
    4. // Configuration for all environments
    5. automaticConfiguration = false
    6. sdk = 'iphoneos'
    7. configuration = 'Release'
    8. }
    9. }
    build - Runs builds for all project's target environments
    buildIos - Runs builds for all project's Ios target environments
    restoreDependencies - Restores project's dependencies

    View full-size slide

  54. 1. ctcoMobile {
    2. platform = 'xamarin'
    3. xamarin {
    4. solutionFile = file(‘App.sln’)
    5. projectFile = file(‘App.iOS/App.iOS.csproj')
    6. projectName = ‘App.iOS'
    7. assemblyName = 'AppiOS'
    8. }
    9. xandroid {
    10. solutionFile = file('App.sln')
    11. projectFile = file('App.Android/App.Android.csproj')
    12. projectName = 'App.Android'
    13. assemblyName = 'AppAndroid'
    14. }
    15. }

    View full-size slide

  55. Multi-Profile Build
    Key-Value Configs
    Builds for Different Vendors
    Builds for Different Environments

    View full-size slide

  56. Dependency Management
    for iOS
    Using compiled .zip files and Artifactory

    View full-size slide

  57. Summary: as glue
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-
    2. Building Stuff

    View full-size slide

  58. 3. Extra Spicy Recipes

    View full-size slide

  59. Problems with managing android
    build tool version on CI?

    View full-size slide

  60. Problems with managing android
    build tool version on CI?
    1. # Experimental flag, new in 2.2.0-alpha
    2. android.builder.sdkDownload=true

    View full-size slide

  61. Looking into Cross-platform
    UI Test Automation?

    View full-size slide

  62. Looking into Cross-platform
    UI Test Automation?

    View full-size slide

  63. https://www.youtube.com/watch?v=iwvueGzwVyk

    View full-size slide

  64. How to get cheap on
    premise device
    farm?

    View full-size slide

  65. https: //github.com/Genymobile/genymotion-gradle-plugin
    1. genymotion {
    2. devices {
    3. nexus5 {
    4. template "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920"
    5. }
    6. }
    7. }

    View full-size slide

  66. Tired of creating
    separate Retina/non
    Retina Images and
    Android -dpi?

    View full-size slide

  67. Tired of creating
    separate Retina/non
    Retina Images and
    Android -dpi?
    https: //github.com/redwarp/9-Patch-Resizer

    View full-size slide

  68. How to distinguish app
    for different
    environments, vendors?

    View full-size slide

  69. How to distinguish app
    for different
    environments, vendors?
    https: //github.com/coobird/thumbnailator

    View full-size slide

  70. https: //github.com/coobird/thumbnailator
    1. Thumbnails.of(new File("original.jpg"))
    2. .size(160, 160)
    3. .rotate(90)
    4. .watermark(Positions.BOTTOM_RIGHT,
    5. ImageIO.read(new File("wtrmrk.png")), 0.5f)
    6. .outputQuality(0.8)
    7. .toFile(new File("image-with-watermark.jpg"));

    View full-size slide

  71. Localizations?

    View full-size slide

  72. https://github.com/evernote/serge

    View full-size slide

  73. 1. Landscape Overview
    <<-
    ->>
    <<-
    <<-
    <<-
    <<-
    <<-
    <<-

    View full-size slide

  74. Q&A
    Thank You!

    View full-size slide