4

問題

Jenkins でアプリケーションをビルドしようとしていますが、Github のプライベート リポジトリにあり、プライベート サブモジュールもあります。

資格情報を設定することで、Jenkins でプライベート リポジトリのクローンを作成できますが、Jenkins はサブモジュールのクローンを作成できません。失敗したビルドの出力は次のとおりです。

Started by an SCM change
Building in workspace /var/lib/jenkins/jobs/Project/workspace
Fetching changes from the remote Git repository
Fetching upstream changes from git@github.com:user/repogit
using GIT_SSH to set credentials 
Checking out Revision 9cc99b67cc676d0ea8ccd489a8327f5c6dbb8d7f (origin/branch)
[workspace] $ /bin/sh -xe /tmp/hudson2710403018107019432.sh
+ git submodule update --init --recursive
Initialized empty Git repository in /var/lib/jenkins/jobs/repository/submodule/.git/
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
Clone of 'git@github.com:user/submodule.git' into submodule path 'repository/submodule/' failed
Build step 'Execute shell' marked build as failure
Discard old builds...
#156 is removed because status FAILURE is not to be kept
Publishing Clover coverage report...
No Clover report will be published due to a Build Failure
Sending e-mails to: 
Finished: FAILURE

これが私がジェンキンスでやろうとしたことです

  • 追加の動作「高度なサブモジュールの動作」を設定しようとしましたが、成功しませんでした。
  • phpunit でテストを実行する前に、新しいステップをセットアップしようとしました。

git submodule update --init --recursive

  • テストされているメインリポジトリだけでなく、サブモジュールのプロジェクトにもgitリポジトリを設定しようとしましたが、運もありません。

それらはすべて、Jenkins がサブモジュールのリポジトリを見つけられないというエラーを引き起こします。

どうすればこれを解決できますか?

(ユーザー名、パス、リポジトリは正しいです。ここに投稿するように変更しました)

4

1 に答える 1