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
Ship cli tools for cross-platform with Github +...
Search
TANABE Ken-ichi
September 26, 2014
Technology
0
1.4k
Ship cli tools for cross-platform with Github + wecker
TANABE Ken-ichi
September 26, 2014
Tweet
Share
More Decks by TANABE Ken-ichi
See All by TANABE Ken-ichi
AAA: An ACME Agent for AWS environment
nabeken
0
3.3k
Introduction to Terraform
nabeken
0
2.5k
The Twelve-Factor Apps
nabeken
0
52
Go and License
nabeken
8
11k
Other Decks in Technology
See All in Technology
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
12k
他チームへ越境したら、生データ提供ソリューションのクエリ費用95%削減へ繋がった話 / Cross-Team Impact: 95% Off Raw Data Query Costs
yamamotoyuta
0
240
kintone開発組織のDevOpsへの移り変わりと実践
ueokande
1
120
大規模PaaSにおける監視基盤の構築と効率化の道のり
lycorptech_jp
PRO
0
180
大手企業のAIツール導入の壁を越えて:サイバーエージェントのCursor活用戦略
gunta
19
5.2k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
38k
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
1.2k
TechBull Membersの開発進捗どうですか!?
rvirus0817
0
220
継続戦闘能⼒
sansantech
PRO
0
220
MCP Clientを活用するための設計と実装上の工夫
yudai00
1
810
JNation 2025 - Quarkus for Spring Developers
edeandrea
PRO
0
110
AIエージェントデザインパターンの選び方
almondo_event
0
150
Featured
See All Featured
Speed Design
sergeychernyshev
30
970
The Invisible Side of Design
smashingmag
299
50k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.3k
Designing Experiences People Love
moore
142
24k
It's Worth the Effort
3n
184
28k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Practical Orchestrator
shlominoach
188
11k
Statistics for Hackers
jakevdp
799
220k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Transcript
Ship cli tools for cross- platform w/Github + wecker 2014/09/26@HDE
MTS TANABE Ken-ichi
動機 • OS X, Linux, Windows向けにcliツールを配布 したい • 開発者以外にも使ってほしい ◦
APIを叩いて何か処理をしたり ◦ 簡単なサーバを起動してデータをやりとりしたり • いつものようにCIしつつビルド、リリースまで自動 化したい
道具 • Go ◦ クロスプラットフォーム (OS X, Linux, Windows, BSD)
◦ 単一バイナリ ◦ 豊富な標準ライブラリ (syscallからnet/httpまで) • Github ◦ ソースコードリポジトリ • Wercker ◦ ビルド環境を自由に作成できるCI as a Service ◦ goxcを使い、クロスコンパイル ◦ 成果物をGithub Releasesへデプロイ
goxc • goxcを使うと以下を自動的に実行 ◦ 各プラットフォーム向けツールチェインのビルド (必要なら) ◦ クロスコンパイル ◦ プラットフォーム毎にアーカイブ
• goxcももちろんGoで書かれていてダウンロードする だけで動作する goxc -tasks='xc archive' -bc 'linux,amd64,386 darwin,amd64,386'
wercker (workerと読む) • Dockerのコンテナのように ビルド環境をboxとして自 由に構築、共有できる • 成果物のデプロイプロセス も定義できる •
サービスはまだベータの 位置付け
wercker (build) • YAMLでビルドプ ロセスを定義 • go {get, build, test,
fmt} • 最後にgoxcでビ ルド
wercker (one-click deployment) herokuなどのPaaS にもデプロイ可能
wercker (deploy) • UIから手動デプロイ • 特定ブランチへの pushに応じて自動 デプロイ
参考文献 • “pecoのバイナリ配布の話” http://lestrrat.ldblog.jp/archives/39736492.html • “Wercker で Go のプロジェクトをクロスコンパイルし、 Github
にリリースする” http://motemen.hatenablog. com/entry/2014/06/27/xcompile-go-and-release-to- github-with-wercker • nabeken/docker-cleaner (上をまねて作った) https://github.com/nabeken/docker-cleaner