gpt4 book ai didi

python - Jenkins Git 插件 : git describe cannot describe anything

转载 作者:太空狗 更新时间:2023-10-29 14:48:47 24 4
gpt4 key购买 nike

我正在使用 Git Plugin Jenkins ans 使用Douglas Creager's get_git_version脚本。这使用 git describe 为 python 模块获取一些合理的版本。通常这会创建类似 0.1-11-g80fe130 的内容,但在 jenkins 上我得到:

+ git describe
fatal: No names found, cannot describe anything.

我已经通过“跳过内部标签”将插件配置为不提供自己的标签。

this question about pushing from jenkins 一样对主分支进行额外的检查没有帮助。

最佳答案

关于标签(如“Git Tip of the Week: Tags”中所述)

If no annotated tags are found then it will print fatal: No names found, cannot describe anything.
To allow describe to use non-annotated tags, run with git describe --tags.
It’s also possible to get it to describe against a branch using git describe --all, although this only makes sense if the branch is known remotely.

因此,Git 插件正在对其执行简单的 git describe 的当前存储库可能不包含任何带注释的标签(这解释了为什么检查分支的尖端不能解决问题:这是'关于 DETACHED HEAD 情况)

您需要克隆存储库,包括标签。


实际上,OP Jasper Van Den Bosch报告:

I wasn't pushing the tags correctly

没有推送标签,意味着 Jenkins 在更新自己的克隆时没有得到这些标签,意味着 git describe 无法正常工作。

关于python - Jenkins Git 插件 : git describe cannot describe anything,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10268641/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com