私はあなたの大部分が笑っていると思う何かをしていると確信していますが、私はジェンキンスをマルチブランチパイプライン。私は問題を本質に単純化しました。空のノードJenkinsFileを持つ単一のブランチ(マスター)。私は2番目のプロジェクト、基本的にtrue
を実行してビルドを検証する標準フリースタイルプロジェクトを持っています。JenkinsFileでマルチブランチパイプラインが動作しないように見える
は、ここに私のフリースタイルの設定です:
Repository URL: ssh://[email protected]:7999/dw/foobar.git
Credentials: None
BUILD
Execute Shell
Command: True
そしてビルドが動作します。 (基本的には、レポ・チェックアウト、true
実行され、ビルドが成功として報告されて
ここに私のマルチブランチビルド構成だが:。私は支店インデックスを行うと
BRANCH SOURCES
Project Repository: ssh://[email protected]:7999/dw/foobar.git
Credentials: None
BUILD CONFIGURATION
Mode: By JenkinsFile
、私は失敗し、ログを取得します言う:(レポのルートに座っている)
Started
Setting origin to ssh://[email protected]:7999/dw/foobar.git
Fetching origin...
FATAL: Failed to recompute children of test » Jenkinsfile Test \
java.lang.IllegalStateException: Cannot open session, connection is \
not authenticated.
at com.trilead.ssh2.Connection.openSession(Connection.java:1127)
at org.jenkinsci.plugins.gitclient.trilead.TrileadSession.exec(TrileadSession.java:32)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:174)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:146)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE
私JenkinsFileは言う:
node {
}
これは、私がマルチブランチパイプラインを実行していないときに、Jenkinsビルドスクリプトとしてこれを置くときに機能します。私はJenkinsが私のJenkinsFileを拾うことができることを確認したいだけです。