LoginSignup
13
7

More than 5 years have passed since last update.

travis-ci.org から travis-ci.com へ 移行をした時の話

Last updated at Posted at 2018-12-03

この記事は、ドワンゴ Advent Calendar 2018の2日目です。

2018年2月に『npm prepublish の現状と今後どう変わっていくか』という記事を書いたのですが、当時の npm の最新バージョンは 5.6.0 でした。2018年12月現在の最新バージョンは 6.4.1 です。メジャーバージョンが上がり、なにか変わったかなーと思ったのですが、まだ1年経っておらず、特に何も変わっていませんでした。
なので、私個人のリポジトリにて使っている CI を、 travis-ci.org から travis-ci.com へ移行したときのことを書きます。

2019年3月26日 追記

現在、移行機能のクローズドβをやっているらしく、この記事のようにすべての手順をメールでやる必要はないようです。
コメントを頂いて気づきました、thx)

TL; DR

発端と概要

やったこと

  1. 「travis-ci.org から travis-ci.com へ、リポジトリの移行をしてほしい」と support@travis-ci.com 宛にメールを出す
  2. 必要に応じて、適当にやり取りする
  3. 「完了したよ!」という旨のメールが来る(ので、thank you ってメールを返した)

発端

2018年4月2日から、public リポジトリと private リポジトリの両方が travis-ci.com を使えるようになりました
公式ドキュメントによると、予定では2018年の第2四半期(6月?)までに移行を済ませる予定だったようですが、延期になったようです。その後の「移行できるようになったというアナウンス」は、ブログを見る限りでは、まだ出ていさそうです。
また、ビルドの履歴と(Web UI 上での)ビルドの設定が、引き継げなくても良いのなら、すぐに移行できるので、その場合はメールをしてくれ、と書かれています。
個人的には、さっさと travis-ci.com に統合しておきたかったので、メールを出しました。

メールでのやりとり

公開できないことは特に無いと思いますので、メールでのやり取りを載せておきます。

私は英語がよくわからないので、文法とか単語選びがおかしい箇所が散見されますが、まぁ大目に見てやってください。

最初に出したメール

まずは「移行したい」というメールを送りつけます。

日時: 2018/11/27 23:00
件名: Repository Migration Request
本文:

Would you migrate my 5 repositories CI from travis-ci.org to travis-ci.com:
- ndxbn/anyenv
- ndxbn/dotfiles
- ndxbn/ndxbn.dip.jp
- ndxbn/npm-prepublish-migration-test
- ndxbn/phpredis-codeception-test

Regards,
Sitri Kamishirasawa @ndxbn

(ちなみに、このメールに列挙したリポジトリのうち、2つは間違っています。あとでそれに関するやり取りがあります。)

公式ドキュメントには以下のように書かれているので、その通りにしました。

Please contact support support@travis-ci.com. In your email, please include:

-“Repository Migration” somewhere in the subject line, and
- the repository’s name in your email

自動返信のやつ

数分で、以下のような自動返信のメールが来ます。

日時: 2018/11/27 23:02

Hey there,

Thanks so much for reaching out!

This is just a quick note to let you know we've received your message. Our support hours are typically between 10:00 AM CET - 10:00 PM CET, Monday to Friday. We will do our very best to respond as soon as possible.

If you have any additional information for us, like screenshots, build URLs, or things you've tried, please reply directly to this email.

Cheers,

The Travis CI Builders

「注意事項があるので、OK なら返信してくれ」

最初のメールを出してから4分後(自動返信のメールから2分後)、以下のようメールが来ました。

日時: 2018/11/27 23:04

Hey there,

Thanks for writing in and we are glad to hear you are ready to take the plunge with moving your open source repositories to travis-ci.com!

It is possible to make it happen as of today, but with some caution. There are caveats (see below) but for some customers, these are not a problem and we can migrate their repos on request immediately.

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

We are developing an internal migration tool, which will overcome the above, however, this is not yet available.

If the caveats are not suitable for your situation, let us know, and we’ll add you to the list of customers that want to be notified when a full migration of repos, history and environment variables is possible.

Thanks in advance and we will follow-up upon your reply.

Have a great day!

Luna

いくつかの注意事項があるのだけれど、問題がなければすぐに移行できるよ、とのことです。

注意事項というのは、以下の 6つ らしいです。

  • ビルド番号は 0 にリセットされる
  • travis-ci.com でのビルドは、まっさらなビルド履歴から始まる(= ビルド履歴は引き継がれない)
  • travis-ci.org 上での履歴は、 travis-ci.org に残る
  • 環境変数は移行されない
  • 環境変数は(travis-ci.com で)再設定する必要があり、暗号化した変数を .travis.yml に書いている場合は、再暗号化されたもの(travis-ci.com 上で作った再設定した変数)に直す必要がある
  • リポジトリの設定の enabled pushpull buildsauto-cancellation などは、移行されない

要するに、Web UI 上で設定するものは移行されないので、自分で再設定してね、ということです。

Migrating repos from travis.ci.org to travis-ci.com currently has the following caveats, let us know,

は、「これらの注意事項が受け入れられない場合は、早めに言ってね」ということだと思います。(当時の私は「大丈夫そうなら言ってね(という意図で言ってるんだろう)」と誤読&誤解をし、「おk、やってください」って内容のメールを返していましたが、それについては特に返信はありませんでした。)

「移行が完了したよ」「移行できなかったリポジトリがあるよ」

翌朝。「移行したけれど、いくつかのリポジトリは移行できなかった」という旨のメールが来ました。

日時: 2018/11/28 8:09

Hey there!

I was able to migrate all of your repos except 2 which gave me some trouble. It looks like ndxbn/ndxbn.dip.jp isn't allowing me to migrate it- it looks like the repository has been archived and set to read-only on Github, which means that it's not possible to migrate it. If you'd like it to be migrated, you'll need to re-activate the repo.

Additionally, I was not able to migrate ndxbn/npm-prepublish-migration-test because it doesn't look like the Travis CI Github app has access to it. Can you follow these steps to add access?

1) Go to your profile page on travis-ci.com: https://travis-ci.com/profile.
2) Click the "Manage repositories on GitHub" button.
3) Add ndxbn/npm-prepublish-migration-test to the repos that you have access to- or check "All Repositories".
4) Click the "Save" green button to save the repos and the GitHub App integration => you'll be redirected back to your profile page on Travis CI.

That's it! Let us know when you are done with this and we'll then be able to finish the migration on our side.

Looking forward to hearing back from you!

Cheers,

Grant

2つのリポジトリで問題があったけれど、それ以外は移行し終わりました、とのことです。
ndxbn/ndxbn.dip.jp リポジトリはアーカイブされていてread-only になっているので、移行してないよ」というのと、「 ndxbn/npm-prepublish-migration-test リポジトリが、GitHub APP 版の Travis CI からアクセスできないよ」というのがあった、とのことです。
これらについては、「問題を解決したら返信してね」とのことですので、確認して返信しましょう。

「確認したら、リポジトリ名間違ってたわ、ごめん」と返信した

移行できなかった2つのリポジトリの話です。
結局、2つのリポジトリはリポジトリ名を間違っていた、という完全に私が悪いやつでした。

日時: 2018/11/28 12:19

Oops, I'm sorry.I have mistakes for each.

ndxbn/ndxbn.dip.jp is mistake that ndxbn/ndxbn.github.io ( and it is not need to migrate)
ndxbn/ndxbn.dip.jp is archived ,that's true, I meant ndxbn/ndxbn.github.io repository, and its CI already has been running on travis-ci.com.

ndxbn/npm-prepublish-migration-test is mistake to npm_prepbulish_migration_test ; not hyphen but underscore.

They're my mistake. I'm sorry to trouble you.

Sitri Kamishirasawa @ndxbn

以下のような意味のつもりで書きました。

まじか、ごめん。どっちも私のミスです。

ndxbn/ndxbn.dip.jpndxbn/ndxbn.github.io の間違いでした( ndxbn/ndxbn.github.io は移行しなくて大丈夫です)。
ndxbn/ndxbn.dip.jp がアーカイブされてるのは正しくて、 ndxbn/ndxbn.github.io のつもりで言ってました。 ndxbn/ndxbn.github.io の CI はすでに travis-ci.com で動いています(ので、移行しなくて大丈夫)。

ndxbn/npm-prepublish-migration-test は、正しくは ndxbn/npm_prepbulish_migration_test でした。ハイフン - と アンスコ _ を間違ってました。

これらは完全に私のミスでした。マジごめん。

「おk、りょ!」とのこと

日時: 2018/11/28 18:06

No worries, Sitri! Thanks for letting us know.

Please don't hesitate to get in touch if there's something else we could help you with, and have a great day!

Best,
Carla

特に言及はされていませんが、 ndxbn/npm_prepbulish_migration_test無事に移行されていました。(移行する前は こちら。)

お礼メールをしておいた

日時: 2018/11/28 21:21

Thank you for your help!

とだけ、返信しておきました。
お礼、大事。

travis-ci.org から travis-ci.com へ移行したリポジトリは、その旨の表示が出ている

移行をしたリポジトリを Web UI で見ると、「このリポジトリは travis-ci.com へ移行されたよ。現行のビルドが見たければry(on travis-ci.org)」「このリポジトリは travis-ci.org から移行さててきたよ。当時のビルドが見たければry(on travis-ci.com)」というお知らせのバナーが出ています。

2018-12-04 08_16_51-Builds - ndxbn_npm_prepbulish_migration_test - Travis CI.png

2018-12-04 08_16_40-ndxbn_npm_prepbulish_migration_test - Travis CI.png

終わりに(やった感想とか)

travis-ci.org から travis-ci.com への移行は、メールでのやり取りだけで完結しました。
メールをしたらすぐに対応をしてくれているみたいな感じなので、さっさと統合しておきたい人は、メールをすると良いでしょう。

すぐ似た王してくれてはいるみたいですが、所要時間的に、多分、この移行は自動化しておらず、手動でやってる気がするので、不要ならしないほうがいいのかも?とも思ったりしますが、そのへんはわかりません。

環境変数の再設定は、まぁ仕方ないかなと思います。Travis の社員さんはトークンなどを知れる機会など欲しくないでしょうし。

ビルド履歴を引き継げないのも、個人的には問題ないと思ってはいますが、静的解析の結果を蓄積しているとか、他のサービスの都合とか、そういうので移行できてないっていうのはありそうかなーとは思いました。

13
7
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
7