【发布时间】:2016-11-03 12:26:50
【问题描述】:
我已经使用 Groovy DSL 定义了一个简单的 Jenkins 管道。我的意图是它会简单地检查我的 git 存储库。但是我遇到了一个错误。
鉴于我的 groovy DSL 定义:
stage 'build'
node
{
git branch: '*/mybranch', credentialsId: 'my credentials', url: 'git@git.servername:pathto/myrepo.git'
}
我希望 Jenkins 管道能够简单地检查我的 git 存储库。
但是我收到以下错误:
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE
谁能帮我解决这个问题?
【问题讨论】:
-
管道记录结帐期间执行的所有特定 git 命令。我会调查那些寻找答案的人,首先比较“短”和“完整”输出。很难向您提出更好的建议,因为您的问题依赖于特定的 git 存储库设置,因此无法重现
标签: jenkins groovy jenkins-pipeline