当我尝试将Jenkins作业升级为使用参数来代替硬编码值时,它不再起作用。
尝试了多个名称,而不是BUILD_BRANCH
在这里,我尝试了${env.BUILD_BRANCH}、refs/heads${BUILD_BRANCH},但它们都没有起作用
最初我确实勾选了轻量级签出,但在阅读了许多在线答案之后我将其删除。但还是没有效果! 我只是添加了'wipe'命令来查看是否有所帮助,但它没有起作用
错误:
> git rev-list --no-walk 97428a402f3304a21ccc8df435a40468ebf406c1 # timeout=10
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] readTrusted
[Pipeline] End of Pipeline
hudson.plugins.git.GitException: Command "git fetch --tags --progress --prune -- origin +refs/heads/${BUILD_BRANCH}:refs/remotes/origin/${BUILD_BRANCH}" returned status code 128:
stdout:
stderr: fatal: Couldn't find remote ref refs/heads/${BUILD_BRANCH}
fatal: The remote end hung up unexpectedly
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2429)
感谢您阅读,即使您无法提供帮助