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

Continuous Delivery for Android

Realm
April 28, 2017

Continuous Delivery for Android

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

Realm

April 28, 2017
Tweet

More Decks by Realm

Other Decks in Technology

Transcript

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

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

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

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

    ੗زਵ۽ ࢎਊ੗ীѱ ߓನػ׮. ૑ࣘ੸ੋ ੋبח ࣗ೐౟ਝযо ೦࢚ ܾܻૉܳ ળ࠺ೞ૑݅ ࠺ૉפझ Ѿ੿੉ ೙ਃೞৈ ݃૑݄ ߓನױ҅ח ࣻز੉૑݅ ૑ࣘ੸ੋ ߓನח সؘ੉౟ ੘স ߡ੹੉ ੗زਵ۽ ಹदػ׮.
  5. ইې ࣽࢲ۽ Google Play ѐߊ੗ ௑ࣛীࢲ ઁಿ ୹दҙܻ੗ ࢲ࠺झ ҅੿ਸ

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

    - ೐۽ં౟ܳ ࠽٘ - ੿੸ ࠙ࢳ بҳ प೯ (lint, findbugs, pmd, checkstyle), - పझ౟ प೯ - ই౭ಂ౟ ই஠੉ࡂ 2. ݽ؍ೠ UI 3. ݫੌ, ठۑ ١ ׮নೠ ࢲ٘౵੉৬ োز ૑ਗ 4. ੸੺ೠ оѺ: 1׳ী $50 (2 parallels) 5. circle.yml੉ۄח ࢸ੿ ౵ੌਸ ࣻ੿ೞח Ѫ݅ਵ۽ рಞೞѱ ੸ਊ оמ 6. Githubҗ ਬӝ੸ੋ োز Circle CI੄ ੢੼
  7. 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
  8. # 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
  9. 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
  10. 1. KVM ীޯۨ੉ఠܳ ૑ਗೞ૑ ঋ਺ Genymotionҗ э਷ بҳ۽ పझ౟ X

    2. CI ௏٘о ௿ۄ਋٘ী ੓যࢲ ࣻ੿ द ੉۱੉ ೣԋ ߸҃ؽ 3. ੌ߈੸ੋ ജ҃ী ੸೤ೞৈ উ٘۽੉٘ա iOS੄ ҃਋ ৘৻੸ੋ ࢚ടী ؀ೠ ୊ܻо ೙ਃ Circle CI੄ ױ੼
  11. workflows: primary: steps: - [email protected]: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne

    ""}}' - [email protected]: {} - [email protected]: inputs: - source: "$BITRISEIO_ANDROID_KEYSTORE_URL" - destination: "$HOME/keystores/release.keystore" - [email protected]: {} - [email protected]: inputs: - gradle_task: "$GRADLE_TASK" - [email protected]: {} bitrise.yml
  12. 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
  13. Bitrise ੢੼ 1. ӝઓ੄ circle ci੄ ੢੼਷ ؀ࠗ࠙ ࣻਊ 2.

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