
Travis CI といえば travis-ci.org だったんですが、
GitHub Checks API を試してみようと思って調べていたら
(そのへんのことはこちら→「ブログズミ: GitHub Checks 対応 CI サービスを使ってみた」)
travis-ci.com のことを知りました。
.com の方は今までは public リポジトリ(OSS)が対応していなかったようですが、public リポジトリも .com を利用可能になりました。
そして、GitHub Checks API に対応しているのは .com の方なので、移行が必要でした。
すでに .org の方でビルドされているプロジェクトは、すぐには .com は使えなくマイグレーションが必要です。(新規の場合は .com で登録できる)
ただ、マイグレーションに関しては順次行われるようですが、遅延しているらしく、すぐに .com に移行したい場合はサポートにメールで依頼する必要があります。
iutest で Checks API を使いたかったので、メール依頼を出してみました。


マイグレーションにあたっての注意点
上記キャプチャにも書かれていますが、マイグレーションをすると .org の方の履歴は消えます。 Web config 部分も消えます。マイグレーション依頼のメールを出すと、最初に本当にいいのかと?注意事項の確認がされます。
Migrating repos from travis.ci.org to travis-ci.com currently has the following caveats:
a) the build number will be reset to zero
b) the repo on travis-ci.com will start with a blank build history
c) the old build history will still be available on travis-ci.org
d) environment variables will not be migrated
e) environment variables will need to be recreated and, where necessary, re-encrypted by the customer for use in .travis.yml
f) repo settings such as enabled push or pull builds, auto-cancellation etc will not be migrated
a) the build number will be reset to zero
b) the repo on travis-ci.com will start with a blank build history
c) the old build history will still be available on travis-ci.org
d) environment variables will not be migrated
e) environment variables will need to be recreated and, where necessary, re-encrypted by the customer for use in .travis.yml
f) repo settings such as enabled push or pull builds, auto-cancellation etc will not be migrated
iutest の場合、履歴に関しては、別に消えても特に問題がないので OK
Web config 系は cron 設定くらいなので、とりあえず .org の設定をキャプチャしておきました。

最初のビルドは4年以上前だったみたいですね。ほー

Hello Travis-CI ".COM"!
メールで注意事項に対して問題ないことを伝えると、ほどなく移行完了メールが来ると思います。あとは、退避しておいた Web Config を戻すのと、 Encrypting environment variables を使っている場合は再生成が必要になります。
(再生成の際には、 travis login --pro で .com の方にログインして行います。エラーメッセージが出ると思うのでやってみればわかると思います)
これにて、無事に移行が完了しました。

GitHub Checks
さて、最後に一番の目的である GitHub Checks を見てみましょう。https://github.com/srz-zumix/iutest/pull/118/checks

ちゃんと出てますね!
各 CI の結果が GitHub のページに集約されるのは、いろんなサービスを使っている自分としてはとても助かります。
対応サービスが今後も増えるといいですね。
今回は以上です。
0 件のコメント:
コメントを投稿