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 Slide

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

    View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. View Slide

  7. View Slide

  8. View Slide

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

    View Slide

  10. 1. Landscape Overview

    View Slide

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

    View Slide

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

    View Slide

  13. How can this be a problem?

    View Slide

  14. needs a

    View Slide

  15. needs a
    needs a

    View Slide

  16. needs a
    needs a
    only needs your

    View Slide

  17. The easiest
    solution:

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  24. https: //jenkins.io/

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  28. Could be a thing for Product Companies

    View Slide

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

    View Slide

  30. 1. Landscape Overview
    Universal Artifact Repository
    <->>
    <<✪

    View Slide

  31. ->>
    ->>
    ->>
    ->>
    ->>

    View Slide

  32. ->>

    View Slide

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

    View Slide

  34. ->>
    ->>
    ->>
    ->>

    View Slide

  35. ->>
    ->>
    ->>
    ->>
    ->>

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  41. 1. Landscape Overview
    Mobile App Management
    <->>
    <<<✪

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  46. - 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 Slide

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

    View Slide

  48. https: // www.hockeyapp.net/

    View Slide

  49. 1. Landscape Overview
    Static Analysis
    <->>
    <<<<<<✪

    View Slide

  50. 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 Slide

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

    View Slide

  52. 1. Landscape Overview
    Analytics
    <->>
    <<<<<<✪

    View Slide

  53. https://get.fabric.io/

    View Slide

  54. View Slide

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

    View Slide

  56. View Slide

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

    View Slide

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

    View Slide

  59. 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 Slide

  60. ->>
    ->>
    ->>
    ->>
    2. Building Stuff

    View Slide

  61. View Slide

  62. One Gradle to Rule them
    All!

    View Slide

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

    View Slide

  64. 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 Slide

  65. 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 Slide

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

    View Slide

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

    View Slide

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

    View Slide

  69. 3. Extra Spicy Recipes

    View Slide

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

    View Slide

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

    View Slide

  72. Looking into Cross-platform
    UI Test Automation?

    View Slide

  73. Looking into Cross-platform
    UI Test Automation?

    View Slide

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

    View Slide

  75. How to get cheap on
    premise device
    farm?

    View Slide

  76. 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 Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  81. 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 Slide

  82. Localizations?

    View Slide

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

    View Slide

  84. 1. Landscape Overview
    <->>
    <<<<<<

    View Slide

  85. Q&A
    Thank You!

    View Slide