Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
動作確認のための社内アプリ配信サービスを新たに作った話 / iOSDC 2018
Search
Tomohiro Moro
September 01, 2018
Programming
2
3.8k
動作確認のための社内アプリ配信サービスを新たに作った話 / iOSDC 2018
iOSDC 2018 9/1 16:20〜 Track C の発表資料です。
Tomohiro Moro
September 01, 2018
Tweet
Share
More Decks by Tomohiro Moro
See All by Tomohiro Moro
法改正を乗り越えるiOSアプリのリリース戦略
slightair
0
4k
たのしいクックパッドでのモバイルアプリエンジニア生活 / newgrads_event2020
slightair
0
640
CI/CD for mobile apps at Cookpad / Bitrise & Cookpad Developer Meetup
slightair
2
3.3k
コンセプトは「機械に人間が合わせる」クックパッドが実践する新しいリリースフローとは / @IT seminar 2018 12 14
slightair
0
570
クックパッドのiOS更新との付き合い方 / CAMPFIRE iOS #2
slightair
0
1.7k
RxSwift + API request + MVVM
slightair
9
2.6k
よくわかんないけど最近つくってるゲームで RxJava つかってみてる
slightair
3
2.1k
ゲームのプレイ動画を気軽にシェアしてもらう
slightair
3
3k
Other Decks in Programming
See All in Programming
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
200
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
初めてDefinitelyTypedにPRを出した話
syumai
0
400
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Better Code Design in PHP
afilina
PRO
0
120
Ethereum_.pdf
nekomatu
0
460
Quine, Polyglot, 良いコード
qnighy
4
640
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
How to train your dragon (web standard)
notwaldorf
88
5.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Agile that works and the tools we love
rasmusluckow
327
21k
4 Signs Your Business is Dying
shpigford
180
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Practical Orchestrator
shlominoach
186
10k
Designing for Performance
lara
604
68k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Facilitating Awesome Meetings
lara
50
6.1k
Transcript
ಈ࡞֬ೝͷͨΊͷࣾΞϓϦ৴ αʔϏεΛ৽ͨʹ࡞ͬͨ 2018/09/01 iOSDC Japan 2018 Track C ໜ࿊ ஐେ
@slightair 1
ࣗݾհ • ໜ࿊ ஐେ / @slightair • ΫοΫύουגࣜձࣾ ٕज़෦ ϞόΠϧج൫άϧʔϓॴଐ
• ࣾͷ։ൃڥඋɺαʔϏε։ൃ෦ॺͷٕज़తࢧԉ͕ۀ 2
ࠓͷ͓ • ͨͪͷࣾΞϓϦ৴ͷ͍ํ • ࠓ·Ͱར༻͖ͯͨ͠ΞϓϦ৴αʔϏε • ৽͘͠࡞ͬͨΞϓϦ৴αʔϏεͷհ • վળ͞ΕͨɾؾΛ͚ͭͨ •
ΞϓϦ৴ʹؔ͢Δͷհ 3
։ൃ͍ͯ͠ΔΞϓϦɺ͍࣮ͭػʹ͍Εͯ৮Δʁ • ࢼ͠ʹ࡞ͬͯΈͨػೳΛ։ൃؔऀΈΜͳͰ৮ΔͨΊ • मਖ਼ͷPRΛग़ͨ͠ͱ͖ • Ճɾमਖ਼ͨ͠ػೳͷಈ࡞֬ೝ • ૢ࡞ײͷ֬ೝ •
ϦϦʔεલͷಈ࡞֬ೝ 4
ৗੜ׆ͷதͰͷ͍৺Λࢼ͍ͨ͠ • ࣮ࡍʹΞϓϦ͕ΘΕΔͰ͋Ζ͏λΠϛϯάͰΞϓϦΛࢼ͍ͨ͠ • ྉཧ͠ͳ͕Β • ҠಈதͳͲɺྉཧͷ͜ͱΛߟ͑ͦ͏ͳλΠϛϯά • ৽ΞϓϦɾ৽ػೳͳΒͳ͓͞ΒɺΘΕΔఆͷγʔϯͰ •
ࣾһͷࢲͷεϚʔτϑΥϯʹ։ൃ൛ͷΞϓϦΛೖΕͯࢼͤΔ Α͏ʹ͍ͯ͠Δ 5
DeployGate Enterprise • ͱҧ͍৴αʔϏεࣗମͷϝϯς͕ෆཁͳͷ͏Ε͍͠ • Enterprise൛Ͱ৫ͷϝϯόʔɾάϧʔϓཧ͕Ͱ͖Δ • ར༻ऀͷୀ৬࣌ͳͲΛߟ͑ΔͱඞਢɺͰཧେม… • άϧʔϓཧ͠Β͕͘ΜͬͯͬͯΈ͚ͨͲɺͨͪ
ͷ͍ํͩͱࡉ͔͍άϧʔϓ͚ඞཁͳ͔ͬͨ 6
TestFlight • ങऩલେม͓ੈʹͳ͍ͬͯͨ • Apple ެࣜͷΈ • ࣾ৴Ͱ Internal Tester
͕༻్ͱ͍͚ۙΕͲ • ࢲͰ͍ͬͯΔ AppleID ΛձࣾͷνʔϜʹొͨ͘͠ͳ͍ • ٯʹձࣾͰऔͬͨ AppleID Λࢲͷ iPhone ʹೖΕͯ͏͔ͱ͍͏ͱɺͦ͏ͳΒͳ͍1 • ͙͢ʹෆ࠾༻ʹͳͬͨ 1 Android/PlayStoreͷํΞΧϯτपΓͷ༥௨͕ޮ͖ͦ͏ͩͬͨɻAlphaϦϦʔεͷػೳར༻Ͱ͖ͦ͏ɻ 7
͍͍ͨਓ͕ٸʹ૿ݮ͢Δͱ͖େม • ʮ։ൃ͖ͯͨ͠ΞϓϦ͕େମͰ͖ͨͷͰࣾςετ൛৴։࢝͠ ͨΑʂΈΜͳͬͯʂʯʢࣾϒϩάʣ • → ৴αʔϏεͷΞΧϯτՃґཔ͕େྔൃੜ • ͦΜͳʹۭ͖͕ͳ͍ͧɺϝϯόʔཧ͠ͳ͖Ό… •
͠Β͘͢Δͱར༻ࣗମ͕མͪண͍ͪΌ͏ • ར༻සతʹશࣾһʹΞΧϯτల։͢Δͷݫ͍͠ 8
ಉ͡ΞϓϦͰෳͷઃఆͰ ผΞϓϦͱͯ͠৴͢Δ • ΞϓϦʹΑͬͯ৭ʑͳ৴ઃఆ͕͋Δ • BETA: ࠷৽ͷmasterϒϥϯνͷ༰Λ৴͢Δ • TEST: ϦϦʔεલͷಈ࡞֬ೝࢼ࡞ஈ֊ͷػೳΛ
Ճ͠ػೳͷݕূ͢Δ • PR: PR୯ҐͰमਖ਼ɾػೳՃͷಈ࡞֬ೝΛߦ͏ • ಉ͡ΞϓϦҰՕॴ·ͱΊ͓͖͍ͯͨ • ଓઌ2ͷมߋΞϓϦͷσόοάπʔϧͰมߋͰ͖ ΔΑ͏ʹ͍ͯ͠Δ 2 produc)onɺstagingɺ֤։ൃऀͷ։ൃڥͳͲ 9
Β͕ཉ͍݅͠ɺղܾ͍ͨ͠ • ৴αʔϏεͷҡ࣋ɾཧෛ୲ΛՄೳͳݶΓ͍͑ͨ • ΞΧϯτཧΛ͕ΜΓͨ͘ͳ͍ • ࣾͷਓؒͳΒ͑Δ͘Β͍ͷ੍ݶͰेͦ͏ɺάϧʔϓͳͲࡉ͔͍ઃఆ· Ͱඞཁͳ͔ͬͨ • ֤ࣗͷՈͳͲɺࣾ֎ͰΠϯετʔϧͰ͖ΔΑ͏ʹ͍ͨ͠
• ଞͷࣾπʔϧͷΞΧϯτɾΞΫηεݖݶཧͱ·ͱ·ͬͯΔͱ͏Ε͍͠ • ଟͷΞϓϦɺͦΕΒʹෳͷ৴ઃఆ͕͖͋ͬͯΕ͍ʹ·ͱΊ͍ͨ 10
haneda • iOS/Android ͚ͷͷࣾΞϓϦ ৴αʔϏε • ΞϓϦҰཡϖʔδͱΞϓϦৄࡉϖʔδ ͕͋Δ͘Β͍ͷγϯϓϧͳ༰ • ઃఆόϦΤʔγϣϯΛkindͱݺͼɺ
ΞϓϦ୯ҐͰ·ͱΊΔ • ࣾωοτϫʔΫ ·ͨ G Suiteೝূ Λ௨ͬͨͷΈΞΫηε͕Մೳ 11
12
haneda ͷߏ • AWS S3ʹϏϧυͨ͠όΠφϦͱϝλσʔλΛهड़ͨ͠JSONΛஔ͢Δ • CIͰϑΝΠϧੜͱΞοϓϩʔυΛߦ͏ͨΊͷfastlane ac4onΛ༻ҙͨ͠ • WebΞϓϦ
• S3ͷJSONΛݩʹHTMLΛϨϯμϦϯά͢Δ • iOSΞϓϦμϯϩʔυ༻ͷmanifestΛಈతੜ͢Δ • DB͍ͬͯͳ͍ • ೝূʹࣾڞ௨ͷϦόʔεϓϩΩγΛར༻͢Δ3 3 groupad(ࣾϒϩάɾWiki)ͳͲͷࣾπʔϧͱڞ௨ͷΞΫηε੍ޚɻղઆهࣄ 13
haneda ʹΑΓվળ͞Εͨ͜ͱ • G Suite ೝূʹͨ͠ͷͰೖࣾ࣌ʹࣾΞΧϯτ͕ൃߦ͞ΕΔͱಉ ࣌ʹར༻Մೳʹͳͬͨ4 • ଞͷࣾπʔϧ܈ͱಉ͡ΞΧϯτɾΞΫηεݖݶͰར༻Մೳ ʹɺࣾ֎Θ༷ͣʑͳॴͰશࣾһ͕ར༻Ͱ͖Δ
• લड़ͷΑ͏ͳγϯϓϧͳߏͷͨΊ৴αʔϏεࣗମͷཧෛ୲ ͦ͜·Ͱ্͕ΒͣʹࡁΜͩ 4 DeployGate ͕ G Suite ࿈ܞʹରԠͨ͠ࡍʹܧଓར༻ݕ౼͕ͨ͠ɺҰ෦ػೳ͕Βͣݟૹͬͨ 14
in-house fastlane ϓϥάΠϯ • in-house fastlane ϓϥάΠϯ5Λ࡞Γࣾ৴Λ৽نΞϓϦ։ൃʹಋ ೖ͍͢͠ڥʹͨ͠ • haneda
ͷ S3 όέοτ໊ͳͲͷઃఆϓϥάΠϯʹؚΊɺ࠷ ݶͷઃఆ͚ͩͰΞοϓϩʔυͰ͖ΔΑ͏ʹ • Beta ͳͲͷΑ͘͏όοδΛ͚ͭͨΓɺάϨΠεέʔϧʹ͢Δͳ ͲΞΠίϯΛՃ͢Δ ac5on ଐ͢Δ 5 ࣾ Gem Server Ͱཧɺfastlane ʹ֎෦ Gem Server ͔ΒϓϥάΠϯΛಋೖͰ͖ΔΈΛՃͨ͠ 15
ϓϥάΠϯͷΞΫγϣϯ܈ • upload_mobile_app_to_s3 / haneda • pre5y_badge • save_adhoc_archive •
Cer;ficates / Profiles • generate_provisioning_profile • generate_apns_cer;ficate • GitHub API wrappers • create_issue • add_labels • add_comment • has_label 16
fastlane match ʹΑΔূ໌ॻɾ伴ཧ • ূ໌ॻɺൿີ伴ɺProvisioning Profile ͳͲΛ҉߸Խͯ͠ϦϙδτϦͰཧ͠ ͍ͯΔ6 • ΞϓϦͷɾkind
͕૿͑ͯҰݩཧͰ͖Δ • EnterpriseProgramͷݖݶ͕ڧ͍ূ໌ॻͳͲΛΈͩΓʹ։ൃऀʹͨ͘͠ͳ ͍ɺCIϚγϯͷΈΞΫηεͰ͖ΕΑ͍ • CIϚγϯ͕ෳ͋ͬͯΠϯετʔϧͷख͕ؒ૿͑ͳ͍ 6 iOSΞϓϦͷαϒϛοτࣗಈԽͱূ໌ॻཧͷޮԽ - ΫοΫύου։ൃऀϒϩά 17
ΞϓϦ৴ͷͨΊͷ lane ఆٛྫ lane :build_and_upload_to_haneda do app_identifier = base_app_identifier +
'-beta' match(app_identifier: app_identifier, type: "enterprise", git_branch: "enterprise", readonly: true) pretty_badge(kind: 'beta', grayscale: false) gym(...) haneda( app_id: base_app_identifier, app_name: 'Overcookpad', kind_id: 'beta' ) end 18
ಛఆͷϥϕϧ͕͍ͭͨPRͷΈ৴ॲཧΛߦ͏ lane :pull_request do |params| pr_number = params[:pr]&.to_i UI.user_error!('Pull request
number required') unless pr_number # (Ϣχοτςετ/֤छੳͳͲ...) next unless has_label(id: pr_number, label: 'InHouseBuild') build_and_upload_to_s3(staging: true, build_kind: :pr) build_url = Actions.lane_context[SharedValues::UPLOADED_MOBILE_APP_BUILD_URL] add_comment(id: pr_number, body: "Build uploaded to #{build_url}") end 19
·ͱΊ • ࣾͷΞϓϦ৴ͷ͍ํʹ߹Θͤͯɺͷ৴αʔϏε haneda Λ࡞ͬͨ • Ͱ͖ΔݶΓγϯϓϧͳߏͰߏங͠ɺͰ͋ͬͯཧෛ୲͕૿͑ͳ͍Α ͏ʹͨ͠ • ଞͷࣾWebπʔϧͱͷ͍উखͱͦΖ͑Δ͜ͱ͕Ͱ͖ɺΞΧϯτཧͷ
ղܾͨ͠ • ΞϓϦ։ൃϓϩδΣΫτ͕૿͑ͯ͘Δͳ͔ɺ৴αʔϏεΛ͘͢ಋೖ͢ ΔͨΊͷΈ߹ΘͤͯͦΖ͑Δ͜ͱ͕Ͱ͖ͨ 20