Pro Yearly is on sale from $80 to $50! »

Continuous Delivery for Android

1fa9cb8c7997c8c4d3d251fb5e41f749?s=47 Realm
April 28, 2017

Continuous Delivery for Android

Continuous Delivery for Android
Droid Knights, Seoul, 2017
Sangkyoon Nam

1fa9cb8c7997c8c4d3d251fb5e41f749?s=128

Realm

April 28, 2017
Tweet

Transcript

  1. 4BOHLZPPO/BN "SDIJUFDUVSF0XOFS OBNTBOHLZPPO!OCUDPN ࡅܰҊ૑ࣘ੸ਵ۽੹׳ೞӝ Continuous Delivery for Android

  2. None
  3. 2012֙ 11ਘ ୐ ୹द, ؀ۚ 2઱ рѺਵ۽ সؘ੉౟ ૓೯

  4. ߈ࠂ!

  5. 01 03 02 04 COMMIT গ೒ܻா੉࣌ী ؀ೠ ࣻ੿ਸ ৮ܐೠ റ

    ࣗझ௏٘ܳ ੷੢ࣗী ழ޿ೠ׮. BUILD ࣻ੿ػ ղਊਸ ੷੢ࣗীࢲ ୓௼ইਓೞৈ पઁ प೯ оמೞب۾ ࠽٘ೠ׮. TESTS ࣻ੿ࢎ೦਷ ׮নೠ пبীࢲ పझ౟ غয ز੘੉ ੉ ࢚੉ হҊ ӝઓ ز੘ী ৔ೱਸ ઱૑ ঋ਺ਸ ഛੋೠ ׮. DEPLOY ࠽٘о ৮ܐػ അ੤ ߡ੹ਵ۽ ೐۽؋࣌ী ߓನػ׮. ࣗ೐౟ਝয ѐߊ ౵੉೐ۄੋ
  6. Continuous ݠदӝ?

  7. Continuous Integration ૑ࣘ੸ੋ ా೤਷ ѐߊ੗о ୓௼ੋ ೡ ٸ ݃׮ ࢜۽਍

    ࠽٘৬ ױਤ పझ౟ܳ ࣻ೯ೠ׮. ౱ীѱ ਃҳࢎ೦ী ؀਽ೞҊ नࣘೞѱ ޙઁܳ ೧Ѿೡ ࣻ ੓ח ࡅܲ ೖ٘ߔ ઁҕೠ׮.
  8. Continuous Delivery ૑ࣘ੸ੋ ੋبח ࣗ೐౟ਝযо ঱ઁٚ૑ ܾܻૉ ؼ ࣻ ੓ب۾

    ળ࠺ೠ׮. ૑ࣘ੸ੋ ా೤, ੗زച పझ౟ ߂ ߓನ ӝמਵ۽ উ੿੸੉Ҋ ࡅܰѱ ѐߊೞҊ ୭ࣗೠ੄ ࣻز য়ߡ೻٘۽ ઁಿਸ ੹׳ೠ׮.
  9. Continuous Deployment ૑ࣘ੸ੋ ߓನח ௏٘ ߸҃द ੹୓ ౵੉೐ۄੋਸ ా೧ ઁಿ੉

    ੗زਵ۽ ࢎਊ੗ীѱ ߓನػ׮. ૑ࣘ੸ੋ ੋبח ࣗ೐౟ਝযо ೦࢚ ܾܻૉܳ ળ࠺ೞ૑݅ ࠺ૉפझ Ѿ੿੉ ೙ਃೞৈ ݃૑݄ ߓನױ҅ח ࣻز੉૑݅ ૑ࣘ੸ੋ ߓನח সؘ੉౟ ੘স ߡ੹੉ ੗زਵ۽ ಹदػ׮.
  10. Continuous Model

  11. ੗زച

  12. CI != CI दझమ

  13. None
  14. None
  15. None
  16. ইې ࣽࢲ۽ Google Play ѐߊ੗ ௑ࣛীࢲ ઁಿ ୹दҙܻ੗ ࢲ࠺झ ҅੿ਸ

    ١۾ (PPHMF1MBZ௑ࣛࢎ੉౟ܳয়೑ೠ׮ ࢸ੿చ੄"1*ঘࣁझచਸࢶఖೠ׮ ࢜೐۽ં౟ٜ݅ӝߡౡਸ௿ܼೞݶաয়ח׮੉঴۽Ӓীࢲ(PPHMF"1*௑݂ࣛ௼ܳ௿ܼೞৈ੉زೠ׮ ೧׼௑ࣛীࢲsࢲ࠺झ҅੿ٜ݅ӝsܳ௿ܼೞݶ׮੉঴۽Ӓоৌܽ׮ ࢲ࠺झ҅੿੄੉ܴਸੑ۱ೠ׮ ৉ഝࢶఖীࢲ೐۽ં౟ࢲ࠺झ҅੿೯ਤ੗ܳࢶఖೠ׮ ࢜࠺ҕѐఃઁҕ୓௼߅झࢶఖೠ׮ Ӓ۞ݶೞױীࢤӝחఃਬഋী+40/ਸࢶఖೠ׮ ٜ݅ӝׂܳܰݶ׮੉঴۽Ӓоײ൦׮ ஹೊఠী+40/౵ੌ੉׮਍۽٘غҊӒ౵ੌਸӝর೧֬ח׮ (PPHMF1MBZѐߊ੗௑ࣛ۽׮द੉زೠ׮ ࢜۽ࢤࢿػࢲ࠺झ҅੿੄ঘࣁझӂೠࠗৈߡౡਸ௿ܼೠ׮ ঘࣁझӂೠࠗৈ׮੉঴۽Ӓীࢲ৉ഝࢶఖীࢲઁಿ୹दҙܻ੗۽ࢶఖ ೞױ੄ࢎਊ੗୶оߡౡਸׂ۞ࢲ੸ਊೠ׮
  17. ੸ਊೡ ೐۽ં౟ ಫ؊ীࢲ fastlaneਸ ୡӝച TVEPHFNJOTUBMMGBTUMBOF GBTUMBOFTVQQMZJOJU supplyܳ ࢸ੿ KTPO@LFZ@GJMFtQBUIUPZPVSEPXOMPBEFELFZKTPOu

    supplyܳ ࢸ੿ GBTUMBOFTVQQMZSVO
  18. None
  19. None
  20. 1. п ࠽٘о ة݀੸ਵ۽ ز੘ - ੄ઓࢿ ੓ח ௏ٜ٘ ࢸ஖

    - ೐۽ં౟ܳ ࠽٘ - ੿੸ ࠙ࢳ بҳ प೯ (lint, findbugs, pmd, checkstyle), - పझ౟ प೯ - ই౭ಂ౟ ই஠੉ࡂ 2. ݽ؍ೠ UI 3. ݫੌ, ठۑ ١ ׮নೠ ࢲ٘౵੉৬ োز ૑ਗ 4. ੸੺ೠ оѺ: 1׳ী $50 (2 parallels) 5. circle.yml੉ۄח ࢸ੿ ౵ੌਸ ࣻ੿ೞח Ѫ݅ਵ۽ рಞೞѱ ੸ਊ оמ 6. Githubҗ ਬӝ੸ੋ োز Circle CI੄ ੢੼
  21. None
  22. machine: environment: PATH: $ANDROID_NDK:$PATH GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryEr java: version: oraclejdk8

    dependencies: pre: # if necessary SDK / build tools / support library folders do not exist, u - if [ ! -d "/usr/local/android-sdk-linux/platforms/android-24" ]; then ec - if [ ! -d "/usr/local/android-sdk-linux/build-tools/24.0.2" ]; then echo - if [ ! -d "/usr/local/android_sdk/extras/android/m2repository/com/androi test: override: - ./gradlew test assembleDebug -PdisablePreDex circle.yml
  23. None
  24. None
  25. keystore ੉ग ࠽٘द ೙ਃೠ keystore ౵ੌਸ ׮਍۽٘ ೞӝ ਤ೧ झ௼݀౟

    ੘ࢿ
  26. None
  27. # use curl to download a keystore from $KEYSTORE_URI, if

    set, # to the path/filename set in $KEYSTORE. if [[ $KEYSTORE && ${KEYSTORE} && $KEYSTORE_URI && ${KEYSTORE_URI} ]] then echo "Keystore detected - downloading..." # we're using curl instead of wget because it will not # expose the sensitive uri in the build logs: curl -L -o ${KEYSTORE} ${KEYSTORE_URI} else echo "Keystore uri not set. .APK artifact will not be signed." fi misc/download_keystore.sh
  28. machine: environment: PATH: $ANDROID_NDK:$PATH GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryEr KEYSTORE: ${HOME}/${CIRCLE_PROJECT_REPONAME}/signing.keystore java:

    version: oraclejdk8 dependencies: pre: # if necessary SDK / build tools / support library folders do not exist, u - if [ ! -d "/usr/local/android-sdk-linux/platforms/android-24" ]; then ec - if [ ! -d "/usr/local/android-sdk-linux/build-tools/24.0.2" ]; then echo - if [ ! -d “/usr/local/android_sdk/extras/android/m2repository/com/androi - bash ./misc/download_keystore.sh test: override: - ./gradlew test assembleDebug -PdisablePreDex circle.yml
  29. signingConfigs { release { storeFile file(System.getenv("KEYSTORE")) storePassword System.getenv("KEYSTORE_PASSWORD") keyAlias System.getenv("KEY_ALIAS")

    keyPassword System.getenv("KEY_PASSWORD") } } build.gradle
  30. 1. KVM ীޯۨ੉ఠܳ ૑ਗೞ૑ ঋ਺ Genymotionҗ э਷ بҳ۽ పझ౟ X

    2. CI ௏٘о ௿ۄ਋٘ী ੓যࢲ ࣻ੿ द ੉۱੉ ೣԋ ߸҃ؽ 3. ੌ߈੸ੋ ജ҃ী ੸೤ೞৈ উ٘۽੉٘ա iOS੄ ҃਋ ৘৻੸ੋ ࢚ടী ؀ೠ ୊ܻо ೙ਃ Circle CI੄ ױ੼
  31. None
  32. ਕ௼೒۽਋ ী٣ఠ

  33. workflows: primary: steps: - activate-ssh-key@3.1.1: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne

    ""}}' - git-clone@3.4.1: {} - file-downloader@0.9.1: inputs: - source: "$BITRISEIO_ANDROID_KEYSTORE_URL" - destination: "$HOME/keystores/release.keystore" - install-missing-android-tools@0.9.2: {} - gradle-runner@1.5.4: inputs: - gradle_task: "$GRADLE_TASK" - deploy-to-bitrise-io@1.2.7: {} bitrise.yml
  34. None
  35. None
  36. None
  37. None
  38. None
  39. None
  40. None
  41. None
  42. None
  43. None
  44. None
  45. None
  46. None
  47. None
  48. None
  49. None
  50. None
  51. app: envs: - opts: is_expand: false GRADLE_BUILD_FILE_PATH: build.gradle - opts:

    is_expand: false GRADLE_TASK: assembleDebug crashlyticsUploadDistributionDevelopmentDebug - opts: is_expand: false GRADLEW_PATH: "./gradlew" bitrise.yml
  52. Bitrise ੢੼ 1. ӝઓ੄ circle ci੄ ੢੼਷ ؀ࠗ࠙ ࣻਊ 2.

    ਕ௼೒۽਋ܳ UI۽ ઑ੿ೡ ࣻ ੓਺ 3. fastlaneਸ ੗زച ో۽ ૑ਗ 4. о੢ ݆Ҋ рױೠ ࢲ٘౵੉৬ োز ૑ਗ 5. preset੉ ੜ ૑੿غয ੓য ӓױ੸ਵ۽ ࡅܰѱ ੸ਊ оמ 6. docker ӝ߈ਵ۽ circle ciࠁ׮ ডр ࡅܲ ו՝
  53. check in hook prod deploy

  54. Continuous Model

  55. పझ౟৬ ߓನ

  56. check in hook prod deploy unit & integration tests acceptance

    tests test deploy
  57. ੗زചػ పझ౟৬ ߓನ۽ ૣ਷ ઱ӝ੄ ೖ٘ߔҗ ѐࢶਸ ߈ࠂೞৈ ࡅܰҊ ૑ࣘ੸ੋ

    ઁಿ(= о஖)ܳ ੹׳ೠ׮.
  58. TODO!

  59. ੋࣻ పझ౟ܳ ௿ۄ਋٘۽…

  60. None
  61. AARҗ э਷ ۄ੉࠳۞ܻח যڌѱ?

  62. None
  63. хࢎ೤פ׮.