webアプリケーションの開発をしていて、データベースのスキーマを再利用するため、リポジトリをサブモジュールとして管理するようにしています。
アプリとスキーマの両方で修正を行いプルリクエストを出すと、circleCIでCIが走るのですが、以下のURLを参考にサブモジュールのymlの設定をしたところ、circleCIの実行時に、下記のエラーが出てしまいます。
https://circleci.com/docs/1.0/configuration/#checkout
git submodule sync git submodule update --init Submodule 'app/database' (https://github.com/username/db_schema.git) registered for path 'app/database' Cloning into 'app/database'... remote: Counting objects: 9, done. remote: Compressing objects: 100% (6/6), done. Receiving objects: 100% (9/9), 16.05 KiB | 0 bytes/s, done. Resolving deltas: 100% (1/1), done. remote: Total 9 (delta 1), reused 6 (delta 1), pack-reused 0 fatal: reference is not a tree: xxxxxxxxxx Unable to checkout 'xxxxxxxxxx' in submodule path 'app/database' Exited with code 1
おそらく、アプリ側で保持しているサブモジュールのコミット番号が、スキーマ側のリポジトリから見つけられなかったのが原因だと思います。
そこで、質問なのですが、git submodule updateでプルリクエストのブランチから特定のコミットを取得する方法はあるのでしょうか?
あなたの回答
tips
プレビュー