CI

CI (継続的統合)

[8] 色々な CIWebサービスが提供されています。

[12]CI」が具体的に何を指すかは若干ふわっとしているところがありますが、 多くのサービスが「構築」、「試験」、「deploy」を想定しています。 (これら3ステップが分かれている場合もあれば、そうでない場合もあります。)

[9] 多くは OSS 無料、それ以外有料というビジネスモデルになっているようです。

[10] Linux を提供するところがほとんどですが、それ以外の OS に対応しているところもあります。

[11] Git リポジトリーが基本となっています。普通は GitHub に対応しています。 BitBucket に対応しているところもいくつかあります。

CI 諸サービスの比較

[13] 幾つかの CI サービスの機能の比較です。 試してみた時点での、見つけることができた機能の比較なので、 最新の状況ではないかもしれませんし、できないと書いてあってもがんばればできることもあるでしょう。

name
名前
oss
OSS 無料
non-free
OSS 無料
github
GitHub
bb
BitBucket
submodule
clone 時の submodule update
linux
Linux
mac
Mac OS X
windows
Windows
matrix
複数環境
docker command
docker コマンド
build then deploy
build 結果を deploy
config in repo
リポジトリー内実行設定
config on site
Web サイト上で実行設定
key in repo
リポジトリー内で秘密値指定
key on site
Web サイト上で秘密値指定
trigger by push
push 時に実行
trigger by api
Web API から実行
rebuild
Webサイト上から実行
time
実行時間制限
webhook
完了後 Web Hooks
heroku
Heroku デプロイ
email
電子メール通知
irc
IRC 通知
security
安全性
note
備考
name
GitHub Actions
oss
non-free
×
github
linux
mac
name
Travis CI サ終
oss
non-free
×
github
bb
×
linux
mac
windows
×
matrix
trigger by push
build then deploy
config in repo
key in repo
key on site
×
rebuild
再実行のみ
time
あり
email
irc
submodule
無限再帰 (.travis.yml で無効化可能)
docker command
Linux のみ
name
Travis CI .com
oss
×
non-free
×
github
name
Circle CI サ終
oss
non-free
github
bb
linux
windows
×
mac
有料
docker command
trigger by push
build then deploy
config in repo
key on site
trigger by api
webhook
heroku
rebuild
email
irc
submodule
なし
note
SSH でログインしてデバッグ可能。
name
CircleCI 2.0
oss
non-free
github
bb
note
SSH でログインしてデバッグ可能。
rebuild
失敗後
name
Wercker
oss
non-free
linux
mac
×
windows
×
bb
github
submodule
なし
build then deploy
×
config in repo
trigger by push
heroku
rebuild
key on site
email
matrix
×
docker command
× (v2)
note
実行環境 Docker image 指定可能。
name
Codeship
oss
github
non-free
bb
linux
mac
×
windows
×
trigger by push
config in repo
×
key on site
name
Shippable
bb
github
linux
mac
×
windows
×
oss
non-free
trigger by push
config in repo
build then deploy
key on site
docker command
submodule
なし
email
irc
name
Semaphore
github
bb
linux
mac
×
windows
×
trigger by api
non-free
回数制限
trigger by push
config in repo
×
key on site
security
なぜか素のHTTPでもアクセスできる。 HSTS 未指定。
time
1時間?
name
AppVeyor
oss
github
bb
linux
×
mac
×
windows
trigger by push
config in repo
config on site
key on site
key in repo
time
30分
matrix
email
webhook
name
Docker Hub (Automated Build)
oss
github
bb
linux
mac
×
windows
×
config in repo
○ (Dockerfile)
trigger by api
trigger by push
webhook
rebuild
email
submodule
なし
name
quay.io (Build)
github
linux
config in repo
○ (Dockerfile)
trigger by api
×
trigger by push
webhook
submodule
無限再帰
name
Snap CI
github
oss
submodule
無限再帰
linux
key on site
config on site
email
name
Magnum CI
oss
non-free
github
bb
submodule
無限再帰
linux
rebuild
再実行のみ
time
30分以内
email
note
リポジトリー追加は手動 (OAuth 未対応)
name
Greenhouse CI
oss
無料枠わずか
non-free
無料枠わずか
github
submodule
2段階
name
Bitrise
submodule
無限再帰
github
security
ドキュメントが素のHTTP
config on site
rebuild
email
mac
name
Buddy
name
CodePipeline

環境変数 CI

CIの環境変数

メモ

[14] UI は基本どのサービスもひどいので、どれがましかという比較になります。 どこも表面的な見た目にこだわって使いやすさを考えていないので、 よく使う機能が中々見つからなかったり、 実行時間が長いと挙動が不審になったり、 ログのサイズが大きくなると動作が不安定になったりします。

[1] Continuous Delivery for free | Codeship ( ( 版)) https://codeship.com/

[2] Continuous Integration · drone.io ( (Brad Rydzewski, Thomas Burke 著, 版)) https://drone.io/

[3] Magnum CI - Hosted Continuous Integration and Continuous Deployment Platform ( ( 版)) https://magnum-ci.com/

[4] Shippable - Continuous Delivery, simplified. ( ( 版)) https://www.shippable.com/

[5] Semaphore: Hosted Continuous Integration & Deployment ( ( 版)) https://semaphoreapp.com/

[6] Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community ( ( 版)) https://travis-ci.org/

[7] 全体的に見て Circle CI がかなり完成度が高い。しかし BitBucket には対応していないのが難点。

継続的インテグレーション

[15] 今選ぶなら CircleCI 一択かなあ。 CircleCIUI が微妙とか突然非互換変更するとか不満はいろいろあるけど (Bitbucket にも今は対応しているよ!)、他はもっとひどいので。

[16] 時間がかかる作業をやりたい → GitHub Actions で試してみる。 (CircleCI はジョブ1時間制限, GitHub Actions はステップで(?)6時間制限)

[17] ディスクの空きが必要な作業をやりたい → CircleCI で試してみる。 何百GBくらいのディスクがある環境で実行される。 (GitHub Actions はストレージが数GB分くらいしかない。)

[18] ログをいっぱい吐く → どこのサービスでも artifacts を使うのが基本。 サイズが多いと動作がおかしくなりがち。 (GitHub Actions は出力 100MB くらいで強制停止。)

[19] GitHub Actions はログファイルに各行が出力された日時が書かれるので、 長時間かかる処理の分析には便利です。

[20] CircleCI はそういう便利な機能はないだけでなく、失敗したステップはなぜか実行時間が表示されないという糞仕様...