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

CIの改善とfastlane plugin

CIの改善とfastlane plugin

28f57a43ae8eba102877b7a3d64f688a?s=128

Kohei Tabata

January 19, 2017
Tweet

Transcript

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

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

    Said Studio LLC Kohei Tabata Next! Remote quick-zip plus
  3. ໨࣍ ɾࠓ·ͰͷCI؀ڥ ɹϝϦοτɺσϝϦοτ ɾ࠷ۙߏஙͨ͠CI؀ڥ ɾfastlane pluginͱ͸ ɾ·ͱΊ

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

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

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

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

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

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

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

    ɾetc… ͦ͏͍͏΋ͷʹ͍ͭͯ͸ɺpluginͱͯ͠ެ։ͯ͠ɺࣗ෼Ͱϝϯςφϯεͯ͠Ͷɻ
  11. ͲΜͳplugin͕͋Δͷʁ

  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Λ࢖ͬͯԻָΛྲྀ͆͢)
  13. ·ͱΊ ɾϫʔΫϑϩʔΛ੔͑Δ͜ͱ͕Ͱ͖ΔͷͳΒɺϥΠϒϥϦΛϦϙδτϦʹ ɹؚΜͩ΄͏͕ྑͦ͞͏ɻ ɾSigningपΓ͸ґવͱͯ͠Ϋη͕ڧ͍ɻ ɾfastlane plugin࡞ΔͱRakeλεΫΑΓ࠶ར༻ੑ͕ߴ·ΔͷͰྑͦ͞͏ɻ

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

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

  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)