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
ビルドパイプラインツールをGoで作った話
Search
Naoki Ainoya
November 30, 2014
Programming
3
2.4k
ビルドパイプラインツールをGoで作った話
A build pipeline tool written in go
Naoki Ainoya
November 30, 2014
Tweet
Share
More Decks by Naoki Ainoya
See All by Naoki Ainoya
Looker BEACON 2021 / How we implemented Scalebase Analytics with Looker
ainoya
0
2.8k
Salesforce Application Development with GitHub Actions and sfdx-cli
ainoya
1
3.7k
Scalebase Analytics powered by Looker
ainoya
0
2.2k
SPIFFE in Action
ainoya
4
1.4k
How Developer Support Works
ainoya
10
2.5k
リクルートマーケティングパートナーズでのDeployGate活用事例
ainoya
2
4.4k
[RMPxQuipper meetup #3]開発のための開発~スマホアプリ向けe2eテストの検証導入事例を通じて~
ainoya
1
2.2k
How to play Scala on dockerized infrastructure
ainoya
4
2.9k
prevs.io開発の裏側とコンテナ仮想化時代のAPI運用
ainoya
4
2.4k
Other Decks in Programming
See All in Programming
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
Jakarta EE meets AI
ivargrimstad
0
230
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
250
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
testcontainers のススメ
sgash708
1
120
Go の GC の不得意な部分を克服したい
taiyow
2
760
良いユニットテストを書こう
mototakatsu
5
1.9k
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
770
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Music & Morning Musume
bryan
46
6.2k
Raft: Consensus for Rubyists
vanstee
137
6.7k
KATA
mclloyd
29
14k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Become a Pro
speakerdeck
PRO
26
5k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
It's Worth the Effort
3n
183
28k
GraphQLとの向き合い方2022年版
quramy
44
13k
Transcript
ϏϧυύΠϓϥΠϯπʔϧΛ GoͰ࡞ͬͨ GoCon 2014 Autumn @naokiainoya https://github.com/tenntenn/gopher-stickers/blob/master/png/28.png
ࣗݾհ ૬୩ थ ainoya ~2013.09 mixi ~ݱࡏ ϦΫϧʔτςΫϊϩδʔζ APιϦϡʔγϣϯG ओͳࣄ:
ɹ ৽ٕज़ͷಋೖݕূͳͲ
IUUQBUMSFDSVJUUFDIDPKQCMPH IUUQBJOPZBJPXBMUFS “ϏϧυύΠϓϥΠϯπʔϧ”
πʔϧͷػೳ • CIͰͷϏϧυύΠϓϥΠϯͷ࣮ߦ੍ޚΛ͢Δπʔϧ • Jenkinsʹ͋ΔϏϧυύΠϓ ϥΠϯϓϥάΠϯͷସ • ઃఆϑΝΠϧ(YAMLܗࣜ)ʹ δϣϒ(࣮ߦ୯Ґ)ͷॲཧ༰ͱ δϣϒͷ࣮ߦॱংΛهड़
πʔϧͷػೳ • CIܥαʔϏεͬΆ͍ઃఆϑΝΠϧʹ࣮ߦ༰ͱॱংΛهड़
πʔϧͷػೳ • CIܥαʔϏεͬΆ͍ઃఆϑΝΠϧʹ࣮ߦ༰ͱॱংΛهड़
πʔϧͷػೳ • CIܥαʔϏεͬΆ͍ઃఆϑΝΠϧʹ࣮ߦ༰ͱॱংΛهड़
πʔϧͷػೳ • CIܥαʔϏεͬΆ͍ઃఆϑΝΠϧʹ࣮ߦ༰ͱॱংΛهड़
πʔϧͷػೳ • CIܥαʔϏεͬΆ͍ઃఆϑΝΠϧʹ࣮ߦ༰ͱॱংΛهड़
GoͰॻ͍ͨཧ༝ HPSPVUJOFͰδϣϒ࣮ߦ DIBOOFMͰ࣮ߦ݁ՌΛ࣍ ʹ͑Δ DIBOOFM͔Βϝοηʔδ ड৴ͨ͠Β࣮ߦ channel/goroutineͰ͍͍ײ͡Ͱॻ͚ͦ͏
GoͰॻ͍ͨཧ༝ • όΠφϦ୯ମͰՄೳ • werckerͰΫϩείϯύΠϧˠ GitHub ReleasesͷΞοϓϩʔυ·Ͱ ϫϯΫϦοΫͰ • motemen/ghqΛࢀߟʹ
IUUQTHJUIVCDPNXBMUFSDEXBMUFSCMPCNBTUFSXFSDLFSZNM
ͦͷଞtips ϓϩδΣΫτߏ • coreos/etcdΛࢀߟʹͨ͠ • {$project-root}/${package-name}/ҎԼʹ .goϑΝΠϧΛஔ͍ͯ͘͠ϧʔϧͰ • Ϣχοτςετຊମͱಉ͡σΟϨΫτϦஔ •
build/testshell scriptͰ https://github.com/walter-cd/walter
ͦͷଞtips ύοέʔδཧ • ࠷ॳsubmoduleͰཧ • ґଘ͕૿͑ͯอकͮ͠Β͘ͳͬͨ • ࠓGodepΛར༻ • /Godeps/Godeps.jsonʹґଘؔهड़
https://github.com/tools/godep
ͦͷଞtips ϩάग़ྗ • ༻్ʹ߹͏ϩάग़ྗϥΠϒϥϦ͕ͳ͔ͬͨ • ଞͷϓϩδΣΫτݢฒΈࣗલͰ༻ҙ • golang/glogΛforkͯ͠ϩάϑΥʔϚοτ Λม͑ͯར༻
GoͰॻ͍ͨॴײ
“golang way” • "Is Go an object-oriented language?" ɹɹɹɹɹɹɹɹɹɹɹ--
"yes and no" • No type hierarchy • Interfaces can be very lightweight https://golang.org/doc/faq#Is_Go_an_object-oriented_language
“golang way” • "Share memory by communicating, don't communicate by
sharing memory.” • channelͰॻ͍ͯΈΔ • ॻ͖ͮΒͦ͏ͩͬͨΒSync.Mutex IUUQTDPEFHPPHMFDPNQHPXJLJXJLJ.VUFY0S$IBOOFM IUUQTPOJBDPEFTXPSEQSFTTDPNDIBOOFMTWTTZODQBDLBHF
࠷ޙʹ • walterͱ͍͏ϏϧυύΠϓϥΠϯπʔϧΛGoͰॻ͍ͨ • όΠφϦָ͕ • goroutine/channelͰδϣϒؒͷϝοηʔδύογϯάΛ͍͍ײ͡ʹ • ·ͩશવͰ͖ͯͳ͍ɽҾ͖ଓ͖ػೳڧԽΛߦ͍͖ͬͯ·͢ •
ΤϥʔϋϯυϦϯάڧԽetc.. • YAMLܗࣜͷઃఆϑΝΠϧΛΊ͍ͨ DSLΛGoͰͲ͏࣮͢Δ͔ߟ͑த