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
3.9k
たのしいクックパッドでのモバイルアプリエンジニア生活 / 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
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
180
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
160
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
470
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
150
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
160
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
490
Quine, Polyglot, 良いコード
qnighy
4
610
ヤプリ新卒SREの オンボーディング
masaki12
0
100
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
260
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2.2k
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
420
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
430
Featured
See All Featured
Being A Developer After 40
akosma
86
590k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.8k
Code Reviewing Like a Champion
maltzj
520
39k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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