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. 2.
  2. 4.
  3. 5.

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

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

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

    ࠽٘৬ ױਤ పझ౟ܳ ࣻ೯ೠ׮. ౱ীѱ ਃҳࢎ೦ী ؀਽ೞҊ नࣘೞѱ ޙઁܳ ೧Ѿೡ ࣻ ੓ח ࡅܲ ೖ٘ߔ ઁҕೠ׮.
  5. 8.

    Continuous Delivery ૑ࣘ੸ੋ ੋبח ࣗ೐౟ਝযо ঱ઁٚ૑ ܾܻૉ ؼ ࣻ ੓ب۾

    ળ࠺ೠ׮. ૑ࣘ੸ੋ ా೤, ੗زച పझ౟ ߂ ߓನ ӝמਵ۽ উ੿੸੉Ҋ ࡅܰѱ ѐߊೞҊ ୭ࣗೠ੄ ࣻز য়ߡ೻٘۽ ઁಿਸ ੹׳ೠ׮.
  6. 9.

    Continuous Deployment ૑ࣘ੸ੋ ߓನח ௏٘ ߸҃द ੹୓ ౵੉೐ۄੋਸ ా೧ ઁಿ੉

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

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

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

    1. п ࠽٘о ة݀੸ਵ۽ ز੘ - ੄ઓࢿ ੓ח ௏ٜ٘ ࢸ஖

    - ೐۽ં౟ܳ ࠽٘ - ੿੸ ࠙ࢳ بҳ प೯ (lint, findbugs, pmd, checkstyle), - పझ౟ प೯ - ই౭ಂ౟ ই஠੉ࡂ 2. ݽ؍ೠ UI 3. ݫੌ, ठۑ ١ ׮নೠ ࢲ٘౵੉৬ োز ૑ਗ 4. ੸੺ೠ оѺ: 1׳ী $50 (2 parallels) 5. circle.yml੉ۄח ࢸ੿ ౵ੌਸ ࣻ੿ೞח Ѫ݅ਵ۽ рಞೞѱ ੸ਊ оמ 6. Githubҗ ਬӝ੸ੋ োز Circle CI੄ ੢੼
  15. 21.
  16. 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
  17. 23.
  18. 24.
  19. 26.
  20. 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
  21. 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
  22. 30.

    1. KVM ীޯۨ੉ఠܳ ૑ਗೞ૑ ঋ਺ Genymotionҗ э਷ بҳ۽ పझ౟ X

    2. CI ௏٘о ௿ۄ਋٘ী ੓যࢲ ࣻ੿ द ੉۱੉ ೣԋ ߸҃ؽ 3. ੌ߈੸ੋ ജ҃ী ੸೤ೞৈ উ٘۽੉٘ա iOS੄ ҃਋ ৘৻੸ੋ ࢚ടী ؀ೠ ୊ܻо ೙ਃ Circle CI੄ ױ੼
  23. 31.
  24. 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
  25. 34.
  26. 35.
  27. 36.
  28. 37.
  29. 38.
  30. 39.
  31. 40.
  32. 41.
  33. 42.
  34. 43.
  35. 44.
  36. 45.
  37. 46.
  38. 47.
  39. 48.
  40. 49.
  41. 50.
  42. 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
  43. 52.

    Bitrise ੢੼ 1. ӝઓ੄ circle ci੄ ੢੼਷ ؀ࠗ࠙ ࣻਊ 2.

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