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

CIの改善とfastlane plugin

Kohei Tabata
January 19, 2017

CIの改善とfastlane plugin

Kohei Tabata

January 19, 2017
Tweet

More Decks by Kohei Tabata

Other Decks in Programming

Transcript

  1. CIͷվળͱ
    fastlane plugin
    2017/01/19
    iOS Test Night #2@DeNA

    View full-size slide

  2. ࣗݾ঺հ
    ɾKohei Tabata(@nerd0geek1)
    ɾSaib Studio LLC
    ɾiOS/MacOS/tvOS Developer
    ɾ࠷ۙ͸ଞͷελʔτΞοϓʹৗறͯ͠ΞϓϦ։ൃͷ
    ɹ͓ख఻͍Λ͍ͯ͠·͢ɻ
    Said Studio LLC Kohei Tabata
    Next! Remote quick-zip plus

    View full-size slide

  3. ໨࣍
    ɾࠓ·ͰͷCI؀ڥ
    ɹϝϦοτɺσϝϦοτ
    ɾ࠷ۙߏஙͨ͠CI؀ڥ
    ɾfastlane pluginͱ͸
    ɾ·ͱΊ

    View full-size slide

  4. ࠓ·ͰͷCI؀ڥ
    ݸਓϓϩδΣΫτ΍ࣗࣾͷখ͞ΊϓϩδΣΫτ͕ϝΠϯɻ։ൃ͸ࣗ෼ͷΈ
    ɹCIαʔόɿ
    ɹɹCircle CI(લ͔Β࢖͓ͬͯΓɺֶशίετ͕௿͍ͨΊ)
    ɹPods/CarthageσΟϨΫτϦɿ
    ɹɹϦϙδτϦʹؚΊͳ͍(ϦϙδτϦΛখ͘͞อͭͨΊɻ)
    ɹSigningɿ
    ɹɹManual Signing(fastlaneΛ࢖͏౎߹্ɻ։ൃऀ͕ࣗ෼1ਓͱ͍͏ͷ΋͋Δ)
    ɹscriptɿ
    ɹجຊతʹFastfile͕ͩɺRakeλεΫ΋ΰϦΰϦ࢖͏ɻ

    View full-size slide

  5. ϝϦοτɾσϝϦοτ
    ϝϦοτ
    ɹɾϥΠϒϥϦؚ͕·Ε͍ͯͳ͍෼ɺϦϙδτϦ͕খ͘͞อͨΕΔɻ
    ɹɾϦϙδτϦͷࠩ෼؅ཧ͕͠΍͍͢ɻ
    σϝϦοτ
    ɹɾ஗͍(ຖճɺϥΠϒϥϦͷΠϯετʔϧ͕࣮ߦ͞ΕΔͨΊɺ
    ɹɹɹɹ1ճͷCIʹ15෼-30෼ఔ౓ඞཁ)
    ɹɾRakeλεΫ͕ଐਓԽ͠΍͍͢ɻ

    View full-size slide

  6. ࠷ۙߏஙͨ͠CI؀ڥ
    ։ൃن໛
    ɹ2016/11ʹ։࢝ͨ͠ϓϩδΣΫτɻiOSΤϯδχΞx2xि5
    CIαʔό
    ɹCircle CI

    View full-size slide

  7. ࠷ۙߏஙͨ͠CI؀ڥ
    Pods/CarthageσΟϨΫτϦɿ
    ɹɾશͯϦϙδτϦʹؚΊΔΑ͏ʹ(Ϗϧυ͕࣌ؒ1൪ͷωοΫʹͳͬͨͨΊ)
    ɹɹϦϙδτϦ͸ڊେʹͳΔ͕ɺCIɺϩʔΧϧͰͷϏϧυ͸ߴ଎ʹɻ
    ɹɾPRʹϥΠϒϥϦͷࠩ෼ؚ͕·Εͯ͠·͏໰୊ʹ͍ͭͯ͸ɺϥΠϒϥϦͷ௥ՃΛ
    ɹɹผPRͱͯ͠෼཭͢Δ͜ͱͰରԠɻ

    View full-size slide

  8. ࠷ۙߏஙͨ͠CI؀ڥ
    Signingɿ
    ɹɾࣗ෼Ҏ֎ʹ΋iOSΤϯδχΞ͕͋Δ
    ɹɾiOSΤϯδχΞҎ֎͔ΒʮΞϓϦͷ࣮ػϏϧυ͍ͨ͠ʯͱ͍͏ཁٻ͕͋ͬͨ
    ɹɾΞϓϦΛࣗಈ഑෍ͯ͠΄͍͠ɺͱ͍͏ཁٻ΋͋ͬͨ
    ɹɹɹˣ
    ɹɹϩʔΧϧɿ
    ɹɹɹAuto SigningΛ࢖༻
    ɹɹCI্ɿ
    ɹɹɹfastlane pluginͰManual Signingʹมߋ
    ɹɹɹxcconfigͰSigningͷઃఆΛ෇༩

    View full-size slide

  9. ࠷ۙߏஙͨ͠CI؀ڥ
    scriptɿ
    Ͱ͖Δ͚ͩfastlane/FastfileʹدͤΔΑ͏ʹɻ
    RakeλεΫͰఆ͍ٛͯͨ͠Ϗϧυ൪߸ͷΠϯΫϦϝϯτ౳΋ɺfastlane pluginͱͯ͠
    FastfileʹدͤΔΑ͏ʹɻ

    View full-size slide

  10. fastlane plugin?
    fastlane1.93.0(2016೥Նࠒ)͔Β࢖͑ΔΑ͏ʹͳͬͨػೳɻ
    ཁ໿͢Δͱɺfastlaneͷmain repoʹ௥Ճ͞ΕΔͷ͸ҰൠతʹҎԼͷ΋ͷͰɺ
    ɾେଟ਺ͷ։ൃऀ͕࢖͍ͦ͏ͳ΋ͷ
    ɾϞόΠϧΞϓϦʹؔ͢Δۤ࿑Λগͳ͘͢Δ΋ͷ
    ௥Ճ͞Εͳ͍ͷ͸
    ɾҰ෦ͷ։ൃऀʹ͔ؔ͠܎͠ͳ͍΋ͷ
    ɾαʔυύʔςΟʹґଘ͍ͯͯ͠ϝϯςφϯε͕େมʹͳΓͦ͏ͳ΋ͷ
    ɾetc…
    ͦ͏͍͏΋ͷʹ͍ͭͯ͸ɺpluginͱͯ͠ެ։ͯ͠ɺࣗ෼Ͱϝϯςφϯεͯ͠Ͷɻ

    View full-size slide

  11. ͲΜͳplugin͕͋Δͷʁ

    View full-size slide

  12. ͲΜͳplugin͕͋Δʁ
    ϓϩδΣΫτϑΝΠϧฤूܥ
    ɾupdate_project_code_signing(Auto/Manual Signing੾ସ)
    ɾsynx(XcodeͷάϧʔϓͱϑΥϧμߏ଄ͱҰகͤ͞Δ)
    ɾremove_provisioning_profile(provisioning profileͷ࡟আ)
    Info.plistฤूܥ
    ɾincrement_version_number_in_plist(ΞϓϦόʔδϣϯͷฤू)
    ɾincrement_build_number_in_plist(Ϗϧυ൪߸ͷฤू)
    δϣʔΫܥ(authorɿKrauseFx)
    ɾascii_art(fastlaneΞΠίϯͷAAΛੜ੒͢Δ͆)
    ɾtunes(fastlaneΛ࢖ͬͯԻָΛྲྀ͆͢)

    View full-size slide

  13. ·ͱΊ
    ɾϫʔΫϑϩʔΛ੔͑Δ͜ͱ͕Ͱ͖ΔͷͳΒɺϥΠϒϥϦΛϦϙδτϦʹ
    ɹؚΜͩ΄͏͕ྑͦ͞͏ɻ
    ɾSigningपΓ͸ґવͱͯ͠Ϋη͕ڧ͍ɻ
    ɾfastlane plugin࡞ΔͱRakeλεΫΑΓ࠶ར༻ੑ͕ߴ·ΔͷͰྑͦ͞͏ɻ

    View full-size slide

  14. ࠷ޙʹએ఻
    2݄ʹOrigami͞ΜͰfastlaneษڧձ΍Γ·͢ʂ

    View full-size slide

  15. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ

    View full-size slide

  16. ࢀߟ
    ɾXcode8 Ͱ։ൃ͸Ͳ͏͔Θͬͨͷ͔
    ɹ(https://speakerdeck.com/dealforest/xcode8-dekai-fa-hadoukawatutafalseka?slide=44)
    ɾfastlane Plugins
    ɹ(https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Plugins.md)
    ɾfastlane available Plugins
    ɹ(https://docs.fastlane.tools/actions/#plugins)

    View full-size slide